Changeset 3862


Ignore:
Timestamp:
Sep 20, 2010, 9:03:32 AM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Removed method getMascotSearchUserDataInputForm from FormFactory.

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

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/file/UseSpectrumFileForMascotSearchExtension.java

    r3454 r3862  
    3939import org.proteios.gui.Title;
    4040import org.proteios.gui.Toolbar;
    41 import org.proteios.gui.form.Form;
    42 import org.proteios.gui.form.FormFactory;
     41import org.proteios.gui.form.*;
    4342import org.proteios.gui.layout.RowLayout;
    4443import org.proteios.gui.table.Table;
     
    6968      throws ActionException, InvalidParameterValue
    7069  {
    71   FormFactory formFactory;
    72    formFactory = this.getFormFactory();
    7370    /***********************************************************************
    7471     * Check input
    7572     */
    7673    /*
    77      * Get the id's of all selected files. FormFactory.VID is the valid
     74     * Get the id's of all selected files. ItemIdField.VPARAM is the valid
    7875     * identifier used when rendering the list of files, thus we use it to
    7976     * get the valid list of item ids.
    8077     */
    81     List<Integer> spectrumFileIds = getValidIntegerList(FormFactory.VID);
     78    List<Integer> spectrumFileIds = getValidIntegerList(ItemIdField.VPARAM);
    8279    log.debug("spectrumFileIds = " + spectrumFileIds);
    8380    /*
     
    107104    log.debug("user = \"" + user + "\"");
    108105    // Get form
    109     Form mascotSearchUserDataInputForm = formFactory.getMascotSearchUserDataInputForm(user);
     106    Form mascotSearchUserDataInputForm = new MascotNameAndEmailForm(user);
    110107    // Add tool bar with 'Next' button to the form
    111108    Toolbar toolbar = new Toolbar();
     
    115112    for (Integer spectrumFileId : spectrumFileIds)
    116113    {
    117     formFactory.addHiddenField(mascotSearchUserDataInputForm,SearchMascot.VSPECTRUMFILEID,spectrumFileId);
     114    getFormFactory().addHiddenField(mascotSearchUserDataInputForm,SearchMascot.VSPECTRUMFILEID,spectrumFileId);
    118115    }
    119116    nextSelect.addParameter(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG, true);
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3861 r3862  
    23362336
    23372337 //Cleaning up from here
    2338 
    2339 
    2340 
    2341 
    2342   /**
    2343    * Returns a form for entering user data for a Mascot search.
    2344    *
    2345    * @param user User The user from whose profile default contact information
    2346    *        should be taken.
    2347    * @return Form for entering Mascot search user data.
    2348    */
    2349   public Form getMascotSearchUserDataInputForm(User user)
    2350   {
    2351     Form form = new Form("mascotSearchUserDataInputForm");
    2352     // Get potential default contact information from user profile
    2353     String defaultName = new String("");
    2354     String defaultEmail = new String("");
    2355     if (user != null)
    2356     {
    2357       // Default name
    2358       if (user.getName() != null)
    2359       {
    2360         defaultName = user.getName();
    2361       }
    2362       // Default e-mail
    2363       if (user.getEmail() != null)
    2364       {
    2365         defaultEmail = user.getEmail();
    2366       }
    2367     }
    2368     //
    2369     Fieldset mascotSearchUserDataInputFS = new Fieldset();
    2370     mascotSearchUserDataInputFS.setTitle(
    2371       "MascotSearchUserDataInput");
    2372     form.addFieldset(mascotSearchUserDataInputFS);
    2373     //
    2374     TextField<String> nameF = new TextField<String>(
    2375       SearchMascot.VMASCOT_SEARCH_USER_NAME);
    2376     nameF.setValue(defaultName);
    2377     nameF.setLabel("Name");
    2378     mascotSearchUserDataInputFS.add(nameF);
    2379     //
    2380     TextField<String> emailF = new TextField<String>(
    2381       SearchMascot.VMASCOT_SEARCH_USER_EMAIL);
    2382     emailF.setValue(defaultEmail);
    2383     emailF.setLabel("email");
    2384     mascotSearchUserDataInputFS.add(emailF);
    2385     //
    2386     return form;
    2387   }
    23882338
    23892339
Note: See TracChangeset for help on using the changeset viewer.