Changeset 3786


Ignore:
Timestamp:
Aug 23, 2010, 1:56:54 PM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #689. Initial revision of DBID and ActiveHitID classes

Location:
trunk/client/servlet/src/org/proteios
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/hit/ViewActiveHit.java

    r3373 r3786  
    3030import org.proteios.ActionLink;
    3131import org.proteios.Localizer;
     32import org.proteios.params.*;
    3233import org.proteios.action.ProteiosAction;
    3334import org.proteios.action.gel.ViewGelOrNewGel;
     
    6162   * Session id for active hit
    6263   */
    63   public static final VInteger VHITID = new VInteger("active.hit.id", 1, true);
     64  public static final VInteger VHITID = new ActiveHitID();
    6465
    6566
  • trunk/client/servlet/src/org/proteios/action/hit/ViewHit.java

    r1916 r3786  
    2929
    3030import org.proteios.action.ProteiosAction;
    31 import org.proteios.gui.form.FormFactory;
     31import org.proteios.params.DBID;
     32import org.proteios.params.ActiveHitID;
    3233import se.lu.thep.waf.ActionException;
    3334import se.lu.thep.waf.constraints.InvalidParameterValue;
    3435
    3536/**
    36  * Sets the ViewActiveHit.VFILEID attribute and forwards request to
    37  * {@link ViewActiveHit}.
    3837 *
    39  * @author olle
     38 * @author gregory
    4039 */
    4140public class ViewHit
    4241    extends ProteiosAction<ViewHit>
    4342{
     43 private static final VInteger vid = new DBID();
     44 private static final VInteger vhitid = new ActiveHitId();
     45
    4446  @Override
    4547  public void runMe()
    4648      throws ActionException, InvalidParameterValue
    4749  {
    48     verifyParameters(FormFactory.VID);
    49     Integer hitId = getValidInteger(FormFactory.VID);
    50     log.debug(this.getClass().getSimpleName() + "::runMe(): hitId = " + hitId);
    51     log.debug(this.getClass().getSimpleName() + "::runMe(): ViewActiveHit.VHITID.getName() = \"" + ViewActiveHit.VHITID.getName() + "\"");
    52     setSessionAttribute(ViewActiveHit.VHITID.getName(), hitId);
     50    Integer hitId;
     51
     52  verifyParameters(id);
     53    hitId = getValidInteger(id);
     54    setSessionAttribute(vhitid.getName(), hitId);
    5355    setForwardTo(ViewActiveHit.class);
    5456  }
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3760 r3786  
    3131import org.proteios.Localizer;
    3232import org.proteios.MascotPropertiesFile;
     33import org.proteios.params.DBID;
    3334import org.proteios.action.ActionFactory;
    3435import org.proteios.action.ProteiosAction;
     
    203204  private HashMap<String, String> filterValueColumnHashMap = null;
    204205  // Valid parameters
    205   public static final VInteger VID = new VInteger("itemId", 1, true);
     206  public static final VInteger VID = new DBID();
    206207  public static final VInteger VPROTOCOLID = new VInteger("protocolId", 0,
    207208    true);
Note: See TracChangeset for help on using the changeset viewer.