Changeset 3846


Ignore:
Timestamp:
Sep 14, 2010, 8:51:11 AM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Removed method getImportHitsNonGelWizardStep2Form from FormFactory

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

Legend:

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

    r3845 r3846  
    7676     * Step 2 Form
    7777     */
    78     Form formStep2 = getFormFactory().getImportHitsNonGelWizardStep2Form(project);
     78    Form formStep2 = new ImportHitsNonGelWizardStep2Form(project);
    7979    // Toolbar
    8080    Toolbar tb2 = new Toolbar();
  • trunk/client/servlet/src/org/proteios/action/hit/ImportHitsNonGelWizardStep2a.java

    r3821 r3846  
    5656    DbControl dc = newDbControl();
    5757    Project project = isProjectActive(dc);
    58     Form impForm = getFormFactory().getImportHitsNonGelWizardStep2Form(project);
     58    Form impForm = new ImportHitsNonGelWizardStep2Form(project);
    5959    verifyParameters(impForm);
    6060    saveToSession(ForwardField.VPARAM);
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3845 r3846  
    21522152 // Cleaning up from here
    21532153
    2154  
    2155   public Form getImportHitsNonGelWizardStep2Form(Project project)
    2156   {
    2157     DbControl dc = project.getDbControl();
    2158     Form form = new Form("importHitsNonGelWizardStep2Form");
    2159     if (dc != null && dc.isConnected())
    2160     {
    2161       // Properties fieldset
    2162       Fieldset properties = new Fieldset();
    2163       properties.setTitle(
    2164         "ImportHitsNonGelWizardStep2FormLegend");
    2165       form.addFieldset(properties);
    2166       /*
    2167        * Disabled text field with info.
    2168        */
    2169       TextField<String> infoF = new DummyField();
    2170       infoF.setDisabled(true);
    2171       infoF.setLabel("SearchResults");
    2172       properties.add(infoF);
    2173       /*
    2174        * Hidden text field for storing plugin id to use.
    2175        */
    2176       TextField<Integer> pluginIdF = new PluginIdField();
    2177       PluginDefinition pluginDef = PluginDefinition.getByClassName(
    2178         project.getDbControl(),
    2179         "org.proteios.plugins.SearchResultsImporter");
    2180       pluginIdF.setValue(pluginDef.getId());
    2181       properties.add(pluginIdF);
    2182       /*
    2183        * This hidden text field sets title to be used for file selection
    2184        * form.
    2185        */
    2186       TextField<String> titleF = new TitleField();
    2187       titleF.setValue("Step 2a. Select Search Result File[s]");
    2188       properties.add(titleF);
    2189       /*
    2190        * This hidden text field sets name to be used for the "Next" button
    2191        * in the file selection form.
    2192        */
    2193       TextField<String> buttonNameF = new NextButtonNameField();
    2194       buttonNameF.setValue("Import");
    2195       properties.add(buttonNameF);
    2196       /*
    2197        * This hidden forward field sets action id used by the file
    2198        * selection action called by ImportHitsNonGelWizardStep2a.
    2199        */
    2200       TextField<String> forwardF = new ForwardField();
    2201       forwardF.setValue(actionFactory
    2202         .getId(ImportHitsNonGelWizardStep2b.class));
    2203       properties.add(forwardF);
    2204     }
    2205     return form;
    2206   }
    2207 
    2208 
    2209   private Select<VString> selectMultiSelectionExternalGelId(DbControl dc,
     2154    private Select<VString> selectMultiSelectionExternalGelId(DbControl dc,
    22102155      Project project, VString vStringParam)
    22112156  {
  • trunk/client/servlet/src/org/proteios/gui/form/ForwardField.java

    r3813 r3846  
    3030import se.lu.thep.waf.constraints.VString;
    3131
    32 public final class ForwardField
    33  extends TextField<String>
     32public final class ForwardField extends TextField<String>
    3433{
    3534  public static final VString VPARAM = new VString("forwardActionId", 1,  255, false);
     
    4039  setHidden(true);
    4140 }
     41
     42 public ForwardField(String value)
     43 {
     44   this();
     45  setValue(value);
     46 }
    4247}
  • trunk/client/servlet/src/org/proteios/gui/form/NextButtonNameField.java

    r3838 r3846  
    4242    setHidden(true);
    4343  }
     44
     45  public NextButtonNameField(String value)
     46  {
     47    this();
     48    setValue(value);
     49  }
     50
    4451}
Note: See TracChangeset for help on using the changeset viewer.