Changeset 3823


Ignore:
Timestamp:
Sep 7, 2010, 2:18:45 PM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Removed VFILESELECTIONTITLE from FormFactory.

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

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/directory/ViewActiveDirectory.java

    r3513 r3823  
    2929package org.proteios.action.directory;
    3030
     31import java.util.ArrayList;
     32import java.util.Hashtable;
     33import java.util.List;
    3134import org.proteios.AbstractLink;
    3235import org.proteios.ActionLink;
     
    6871import org.proteios.gui.TitledWindow;
    6972import org.proteios.gui.Toolbar;
    70 import org.proteios.gui.form.Form;
    71 import org.proteios.gui.form.FormFactory;
    72 import org.proteios.gui.form.TextField;
     73import org.proteios.gui.form.*;
    7374import org.proteios.gui.layout.RowLayout;
    7475import org.proteios.gui.table.Cell;
     
    7677import org.proteios.gui.table.Row;
    7778import org.proteios.gui.table.Table;
     79import org.proteios.gui.table.TableFactory2;
    7880import org.proteios.gui.table.TableFactory;
    79 import org.proteios.gui.table.TableFactory2;
    80 
    8181import se.lu.thep.waf.ActionException;
    8282import se.lu.thep.waf.constraints.InvalidParameterValue;
    8383import se.lu.thep.waf.constraints.VBoolean;
    8484import se.lu.thep.waf.constraints.VInteger;
    85 
    86 import java.util.ArrayList;
    87 import java.util.Hashtable;
    88 import java.util.List;
    8985
    9086/**
     
    154150    {
    155151      // Check input
    156       List<Integer> tmpFileIds = getValidIntegerList(FormFactory.VID);
    157       log.debug("tmpFileIds from FormFactory.VID for input check = " + tmpFileIds);
     152      List<Integer> tmpFileIds = getValidIntegerList(ItemIdField.VPARAM);
     153      log.debug("tmpFileIds from ItemIdField.VPARAM for input check = " + tmpFileIds);
    158154      if (tmpFileIds != null && tmpFileIds.size() > 0)
    159155      {
     
    161157        setSessionAttribute(VSELECTMOVEDIR, true);
    162158        setSessionAttribute(VMOVEFILES, true);
    163         setSessionAttribute(FormFactory.VFWDACTION, MoveFiles.class.getName());
     159        setSessionAttribute(ForwardField.VPARAM, MoveFiles.class.getName());
    164160      }
    165161      else
     
    169165    }
    170166    select = getSessionAttribute(VSELECT);
    171     actionId = getSessionAttribute(FormFactory.VFWDACTION);
     167    actionId = getSessionAttribute(ForwardField.VPARAM);
    172168    selectMoveDir = getSessionAttribute(VSELECTMOVEDIR);
    173169    moveFilesMode = getSessionAttribute(VMOVEFILES);
     
    315311    String formTitle = fetchFormTitle(select, selectMoveDir);
    316312    fileTable.add(getFormFactory().createField(
    317       FormFactory.VFILESELECTIONTITLE).setValue(formTitle));
     313      TitleField.VPARAM).setValue(formTitle));
    318314    // Add optional special name for "Next" button
    319315    String nextButtonName = fetchNextButtonName(select, selectMoveDir);
     
    388384           * navigating from the source to the target directory.
    389385           * First time the id values for selected files are
    390            * stored in the default valid parameter VInteger FormFactory.VID,
     386           * stored in the default valid parameter VInteger ItemIdField.VPARAM,
    391387           * otherwise they are stored in valid parameter VInteger ViewActiveFile.VFILEID.
    392388           */
     
    395391          if (moveFilesStart)
    396392          {
    397             tmpFileIds = getValidIntegerList(FormFactory.VID);
    398             log.debug("tmpFileIds from FormFactory.VID = " + tmpFileIds);
     393            tmpFileIds = getValidIntegerList(ItemIdField.VPARAM);
     394            log.debug("tmpFileIds from ItemIdField.VPARAM = " + tmpFileIds);
    399395          }
    400396          else
     
    682678      try
    683679      {
    684         formTitle = getString(FormFactory.VFILESELECTIONTITLE);
     680        formTitle = getString(TitleField.VPARAM);
    685681      }
    686682      catch (InvalidParameterValue e)
     
    688684      if (formTitle == null || formTitle.equals(""))
    689685      {
    690         formTitle = getSessionAttribute(FormFactory.VFILESELECTIONTITLE);
     686        formTitle = getSessionAttribute(TitleField.VPARAM);
    691687      }
    692688      if (formTitle == null || formTitle.equals(""))
     
    794790        "View");
    795791      clickAction
    796         .addParameter(FormFactory.VFILESELECTIONTITLE, formTitle);
     792        .addParameter(TitleField.VPARAM, formTitle);
    797793      clickAction.addParameter(FormFactory.VFILESELECTIONNEXTBUTTONNAME,
    798794        nextButtonName);
     
    803799         * navigating from the source to the target directory.
    804800         * First time the id values for selected files are
    805          * stored in the default valid parameter VInteger FormFactory.VID,
     801         * stored in the default valid parameter VInteger ItemIdField.VPARAM,
    806802         * otherwise they are stored in valid parameter VInteger ViewActiveFile.VFILEID.
    807803         */
     
    812808          try
    813809          {
    814             tmpFileIds = getValidIntegerList(FormFactory.VID);
     810            tmpFileIds = getValidIntegerList(ItemIdField.VPARAM);
    815811          }
    816812          catch (Exception e)
    817813          {
    818             log.debug("Exception when trying to retrieve file id list from FormFactory.VID: " + e);
     814            log.debug("Exception when trying to retrieve file id list from ItemIdField.VPARAM: " + e);
    819815          }
    820           log.debug("tmpFileIds from FormFactory.VID = " + tmpFileIds);
     816          log.debug("tmpFileIds from ItemIdField.VPARAM = " + tmpFileIds);
    821817        }
    822818        else
  • trunk/client/servlet/src/org/proteios/action/file/PerformMascotSearch.java

    r3511 r3823  
    3232import org.proteios.core.DbControl;
    3333import org.proteios.core.Project;
    34 import org.proteios.gui.form.FormFactory;
    35 
     34import org.proteios.gui.form.*;
    3635import se.lu.thep.waf.ActionException;
    3736
     
    5756    Project project = isProjectActive(dc);
    5857    String forwardActionId = getActionFactory().getId(UseSpectrumFileForMascotSearchExtension.class);
    59     setSessionAttribute(FormFactory.VFWDACTION, forwardActionId);
     58    setSessionAttribute(ForwardField.VPARAM, forwardActionId);
    6059    setSessionAttribute(ViewActiveDirectory.VDIRID, project
    6160      .getProjectDirectory().getId());
    6261    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    63     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectMascotSearchSpectrumFiles");
     62    setSessionAttribute(TitleField.VPARAM, "SelectMascotSearchSpectrumFiles");
    6463    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "NextSelectMascotSearchUserData");
    6564    setForwardTo(ViewActiveDirectory.class);
  • trunk/client/servlet/src/org/proteios/action/file/PerformOMSSASearch.java

    r3511 r3823  
    3232import org.proteios.core.DbControl;
    3333import org.proteios.core.Project;
    34 import org.proteios.gui.form.FormFactory;
    35 
     34import org.proteios.gui.form.*;
    3635import se.lu.thep.waf.ActionException;
    3736
     
    5756    Project project = isProjectActive(dc);
    5857    String forwardActionId = getActionFactory().getId(UseSpectrumFileForOMSSASearchExtension.class);
    59     setSessionAttribute(FormFactory.VFWDACTION, forwardActionId);
     58    setSessionAttribute(ForwardField.VPARAM, forwardActionId);
    6059    setSessionAttribute(ViewActiveDirectory.VDIRID, project
    6160      .getProjectDirectory().getId());
    6261    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    63     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectOMSSASearchSpectrumFiles");
     62    setSessionAttribute(TitleField.VPARAM, "SelectOMSSASearchSpectrumFiles");
    6463    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "NextSelectOMSSAParameterSet");
    6564    setForwardTo(ViewActiveDirectory.class);
  • trunk/client/servlet/src/org/proteios/action/file/PerformXTandemSearch.java

    r3511 r3823  
    3232import org.proteios.core.DbControl;
    3333import org.proteios.core.Project;
    34 import org.proteios.gui.form.FormFactory;
    35 
     34import org.proteios.gui.form.*;
    3635import se.lu.thep.waf.ActionException;
    3736
     
    5756    Project project = isProjectActive(dc);
    5857    String forwardActionId = getActionFactory().getId(UseSpectrumFileForXTandemSearchExtension.class);
    59     setSessionAttribute(FormFactory.VFWDACTION, forwardActionId);
     58    setSessionAttribute(ForwardField.VPARAM, forwardActionId);
    6059    setSessionAttribute(ViewActiveDirectory.VDIRID, project
    6160      .getProjectDirectory().getId());
    6261    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    63     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectXTandemSearchSpectrumFiles");
     62    setSessionAttribute(TitleField.VPARAM, "SelectXTandemSearchSpectrumFiles");
    6463    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "NextSelectXTandemParameterSet");
    6564    setForwardTo(ViewActiveDirectory.class);
  • trunk/client/servlet/src/org/proteios/action/hit/SelectPrideProtocolFileStep1a.java

    r3816 r3823  
    124124    setSessionAttribute(ViewActiveDirectory.VDIRID, dirId);
    125125    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    126     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectPrideProtocolFile");
     126    setSessionAttribute(TitleField.VPARAM, "SelectPrideProtocolFile");
    127127    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "NextCreateExportJobs");
    128128    setSessionAttribute(FormFactory.VFWD2ACTION, forward2Id);
  • trunk/client/servlet/src/org/proteios/action/mascot/SelectMascotParameterFileStep1a.java

    r3297 r3823  
    3434import org.proteios.core.Project;
    3535import org.proteios.core.User;
    36 import org.proteios.gui.form.Form;
    37 import org.proteios.gui.form.FormFactory;
     36import org.proteios.gui.form.*;
    3837import se.lu.thep.waf.ActionException;
    3938import se.lu.thep.waf.constraints.InvalidParameterValue;
     
    6160    Integer parameterTemplateFileId = getInteger(AddMascotParameterSetStorage.VMASCOTPARAMETERTEMPLATEFILEID);
    6261    // Get original forward action
    63     String forward2Id = getValidString(FormFactory.VFWDACTION);
     62    String forward2Id = getValidString(ForwardField.VPARAM);
    6463    String forwardId = getActionFactory().getId(SelectMascotParameterFileStep1b.class);
    6564    log.debug("name = \"" + name + "\"");
     
    9796    setSessionAttribute(AddMascotParameterSetStorage.VMASCOTPARAMETERTEMPLATEFILEID, parameterTemplateFileId);
    9897    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    99     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectMascotParameterTemplateFile");
     98    setSessionAttribute(TitleField.VPARAM, "SelectMascotParameterTemplateFile");
    10099    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "Next");
    101100    setSessionAttribute(FormFactory.VFWD2ACTION, forward2Id);
    102     setSessionAttribute(FormFactory.VFWDACTION, forwardId);
     101    setSessionAttribute(ForwardField.VPARAM, forwardId);
    103102    setForwardTo(ViewActiveDirectory.class);
    104103  }
  • trunk/client/servlet/src/org/proteios/action/omssa/SelectOMSSAParameterFileStep1a.java

    r2917 r3823  
    3434import org.proteios.core.Project;
    3535import org.proteios.core.User;
    36 import org.proteios.gui.form.Form;
    37 import org.proteios.gui.form.FormFactory;
     36import org.proteios.gui.form.*;
    3837import se.lu.thep.waf.ActionException;
    3938import se.lu.thep.waf.constraints.InvalidParameterValue;
     
    6160    Integer parameterTemplateFileId = getInteger(AddOMSSAParameterSetStorage.VOMSSAPARAMETERTEMPLATEFILEID);
    6261    // Get original forward action
    63     String forward2Id = getValidString(FormFactory.VFWDACTION);
     62    String forward2Id = getValidString(ForwardField.VPARAM);
    6463    String forwardId = getActionFactory().getId(SelectOMSSAParameterFileStep1b.class);
    6564    log.debug("name = \"" + name + "\"");
     
    9796    setSessionAttribute(AddOMSSAParameterSetStorage.VOMSSAPARAMETERTEMPLATEFILEID, parameterTemplateFileId);
    9897    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    99     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectOMSSAParameterTemplateFile");
     98    setSessionAttribute(TitleField.VPARAM, "SelectOMSSAParameterTemplateFile");
    10099    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "Next");
    101100    setSessionAttribute(FormFactory.VFWD2ACTION, forward2Id);
    102     setSessionAttribute(FormFactory.VFWDACTION, forwardId);
     101    setSessionAttribute(ForwardField.VPARAM, forwardId);
    103102    setForwardTo(ViewActiveDirectory.class);
    104103  }
  • trunk/client/servlet/src/org/proteios/action/xTandemInput/SelectXTandemParameterFileStep1a.java

    r2661 r3823  
    3434import org.proteios.core.Project;
    3535import org.proteios.core.User;
    36 import org.proteios.gui.form.Form;
    37 import org.proteios.gui.form.FormFactory;
     36import org.proteios.gui.form.*;
    3837import se.lu.thep.waf.ActionException;
    3938import se.lu.thep.waf.constraints.InvalidParameterValue;
     
    6160    Integer parameterTemplateFileId = getInteger(AddXTandemParameterSetStorage.VXTANDEMPARAMETERTEMPLATEFILEID);
    6261    // Get original forward action
    63     String forward2Id = getValidString(FormFactory.VFWDACTION);
     62    String forward2Id = getValidString(ForwardField.VPARAM);
    6463    String forwardId = getActionFactory().getId(SelectXTandemParameterFileStep1b.class);
    6564    log.debug("name = \"" + name + "\"");
     
    9796    setSessionAttribute(AddXTandemParameterSetStorage.VXTANDEMPARAMETERTEMPLATEFILEID, parameterTemplateFileId);
    9897    setSessionAttribute(ViewActiveDirectory.VSELECT, true);
    99     setSessionAttribute(FormFactory.VFILESELECTIONTITLE, "SelectXTandemParameterTemplateFile");
     98    setSessionAttribute(TitleField.VPARAM, "SelectXTandemParameterTemplateFile");
    10099    setSessionAttribute(FormFactory.VFILESELECTIONNEXTBUTTONNAME, "Next");
    101100    setSessionAttribute(FormFactory.VFWD2ACTION, forward2Id);
    102     setSessionAttribute(FormFactory.VFWDACTION, forwardId);
     101    setSessionAttribute(ForwardField.VPARAM, forwardId);
    103102    setForwardTo(ViewActiveDirectory.class);
    104103  }
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3821 r3823  
    294294  public static final VBoolean VREADONLYFORM = new VBoolean("readOnlyForm",
    295295    false);
    296   public static final VString VFILESELECTIONTITLE = new VString(
    297     "fileSelectionTitle", 0, 255, false);
    298296  public static final VString VFILESELECTIONNEXTBUTTONNAME = new VString(
    299297    "fileSelectionNextButtonName", 0, 255, false);
     
    710708
    711709
    712   private TextField<String> newHiddenFileSelectionTitleField()
    713   {
    714     TextField<String> field = new TextField<String>(VFILESELECTIONTITLE)
    715       .setHidden(true);
    716     return field;
    717   }
    718 
    719 
    720710  private TextField<String> newHiddenFileSelectionNextButtonNameField()
    721711  {
     
    24232413       * form.
    24242414       */
    2425       TextField<String> titleF = newHiddenFileSelectionTitleField();
     2415      TextField<String> titleF = new TitleField();
    24262416      titleF.setValue("Step 1a. Select Robot Result File[s]");
    24272417      properties.add(titleF);
     
    24632453       * form.
    24642454       */
    2465       TextField<String> titleF = newHiddenFileSelectionTitleField();
     2455      TextField<String> titleF = new TitleField();
    24662456      titleF.setValue("Step 2a. Select PeakList File[s]");
    24672457      properties.add(titleF);
     
    25302520       * form.
    25312521       */
    2532       TextField<String> titleF = newHiddenFileSelectionTitleField();
     2522      TextField<String> titleF = new TitleField();
    25332523      titleF.setValue("Step 3a. Select Search Result File[s]");
    25342524      properties.add(titleF);
     
    25772567       * form.
    25782568       */
    2579       TextField<String> titleF = newHiddenFileSelectionTitleField();
     2569      TextField<String> titleF = new TitleField();
    25802570      titleF.setValue("Step 1a. Select PeakList File[s]");
    25812571      properties.add(titleF);
     
    26512641       * form.
    26522642       */
    2653       TextField<String> titleF = newHiddenFileSelectionTitleField();
     2643      TextField<String> titleF = new TitleField();
    26542644      titleF.setValue("Step 2a. Select Search Result File[s]");
    26552645      properties.add(titleF);
     
    95849574    }
    95859575    // Hidden text field for file selection form title
    9586     TextField<String> titleF = newHiddenFileSelectionTitleField();
     9576    TextField<String> titleF = new TitleField();
    95879577    fs.add(titleF);
    95889578    titleF.setValue("SelectProtocolFile");
     
    1002910019      }
    1003010020      // Hidden text field for file selection form title
    10031       TextField<String> titleF = newHiddenFileSelectionTitleField();
     10021      TextField<String> titleF = new TitleField();
    1003210022      fs.add(titleF);
    1003310023      titleF.setValue("SelectProtocolFile");
  • trunk/client/servlet/src/org/proteios/gui/form/PluginIdField.java

    r3821 r3823  
    3131
    3232/**
     33  Hidden field by default used to forward a selected plugin definition.
    3334*/
    3435public class PluginIdField extends TextField<Integer>
    3536{
     37 /**
     38   Required integer >= 1 named definitionId
     39 */
    3640  public static final VInteger VPARAM = new VInteger("definitionId", 1, true);
    3741
Note: See TracChangeset for help on using the changeset viewer.