Changeset 3862
- Timestamp:
- Sep 20, 2010, 9:03:32 AM (13 years ago)
- 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 39 39 import org.proteios.gui.Title; 40 40 import org.proteios.gui.Toolbar; 41 import org.proteios.gui.form.Form; 42 import org.proteios.gui.form.FormFactory; 41 import org.proteios.gui.form.*; 43 42 import org.proteios.gui.layout.RowLayout; 44 43 import org.proteios.gui.table.Table; … … 69 68 throws ActionException, InvalidParameterValue 70 69 { 71 FormFactory formFactory;72 formFactory = this.getFormFactory();73 70 /*********************************************************************** 74 71 * Check input 75 72 */ 76 73 /* 77 * Get the id's of all selected files. FormFactory.VIDis the valid74 * Get the id's of all selected files. ItemIdField.VPARAM is the valid 78 75 * identifier used when rendering the list of files, thus we use it to 79 76 * get the valid list of item ids. 80 77 */ 81 List<Integer> spectrumFileIds = getValidIntegerList( FormFactory.VID);78 List<Integer> spectrumFileIds = getValidIntegerList(ItemIdField.VPARAM); 82 79 log.debug("spectrumFileIds = " + spectrumFileIds); 83 80 /* … … 107 104 log.debug("user = \"" + user + "\""); 108 105 // Get form 109 Form mascotSearchUserDataInputForm = formFactory.getMascotSearchUserDataInputForm(user);106 Form mascotSearchUserDataInputForm = new MascotNameAndEmailForm(user); 110 107 // Add tool bar with 'Next' button to the form 111 108 Toolbar toolbar = new Toolbar(); … … 115 112 for (Integer spectrumFileId : spectrumFileIds) 116 113 { 117 formFactory.addHiddenField(mascotSearchUserDataInputForm,SearchMascot.VSPECTRUMFILEID,spectrumFileId);114 getFormFactory().addHiddenField(mascotSearchUserDataInputForm,SearchMascot.VSPECTRUMFILEID,spectrumFileId); 118 115 } 119 116 nextSelect.addParameter(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG, true); -
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3861 r3862 2336 2336 2337 2337 //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 information2346 * 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 profile2353 String defaultName = new String("");2354 String defaultEmail = new String("");2355 if (user != null)2356 {2357 // Default name2358 if (user.getName() != null)2359 {2360 defaultName = user.getName();2361 }2362 // Default e-mail2363 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 }2388 2338 2389 2339
Note: See TracChangeset
for help on using the changeset viewer.