Changeset 3845
- Timestamp:
- Sep 14, 2010, 8:06:04 AM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsNonGelWizard.java
r3711 r3845 28 28 package org.proteios.action.hit; 29 29 30 30 31 import org.proteios.ActionLink; 31 32 import org.proteios.Context; … … 38 39 import org.proteios.gui.Title; 39 40 import org.proteios.gui.Toolbar; 40 import org.proteios.gui.form.Form;41 41 import org.proteios.gui.layout.RowLayout; 42 42 import se.lu.thep.waf.ActionException; … … 44 44 import java.util.ArrayList; 45 45 import java.util.List; 46 import org.proteios.gui.form.*; 46 47 47 48 /** … … 65 66 * Step 1 Form 66 67 */ 67 Form formStep1 = getFormFactory().getImportHitsNonGelWizardStep1Form(project);68 Form formStep1 = new ImportHitsNonGelWizardStep1Form(project); 68 69 // Toolbar 69 70 Toolbar tb1 = new Toolbar(); -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsNonGelWizardStep1a.java
r3844 r3845 56 56 DbControl dc = newDbControl(); 57 57 Project project = isProjectActive(dc); 58 Form impForm = getFormFactory().getImportHitsNonGelWizardStep1Form(project);58 Form impForm = new ImportHitsNonGelWizardStep1Form(project); 59 59 // Check input for local sample id 60 60 verifyParameters(impForm); 61 String enteredLocalSampleId = getString( FormFactory.VLOCALSAMPLEID);61 String enteredLocalSampleId = getString(SampleIdField.VPARAM); 62 62 String selectedLocalSampleId = getString(LocalSampleSelect.VPARAM); 63 63 Boolean useRegexPattern = getValidBoolean(ImportHitsNonGelWizardStep1b.VUSEREGEXPATTERN); … … 80 80 { 81 81 // User selected a local sample id, use it 82 setAttribute( FormFactory.VLOCALSAMPLEID, selectedLocalSampleId);82 setAttribute(SampleIdField.VPARAM, selectedLocalSampleId); 83 83 } 84 84 } 85 saveToSession( FormFactory.VLOCALSAMPLEID);85 saveToSession(SampleIdField.VPARAM); 86 86 setSessionAttribute(ImportHitsNonGelWizardStep1b.VUSEREGEXPATTERN, useRegexPattern); 87 87 saveToSession(RegexField.VPARAM); -
trunk/client/servlet/src/org/proteios/action/hit/ImportHitsNonGelWizardStep1b.java
r3841 r3845 69 69 DbControl dc = newDbControl(); 70 70 Project project = isProjectActive(dc); 71 String localSampleId = getSessionAttribute( FormFactory.VLOCALSAMPLEID);71 String localSampleId = getSessionAttribute(SampleIdField.VPARAM); 72 72 Integer pluginDefId = getSessionAttribute(PluginIdField.VPARAM); 73 73 List<Integer> fileIds = getValidIntegerList(ItemIdField.VPARAM); -
trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java
r3844 r3845 105 105 public static final VString VROLEPERMISSIONID = new VString("rolePermId",1, 64, true); 106 106 public static final VString VWELLPOSITION = new VString("wellPosition", 0,8, false); 107 public static final VString VREQUIRED_LOCALSAMPLEID = new VString("localSampleId", 0, 32, true);108 public static final VString VLOCALSAMPLEID = new VString("localSampleId",0, 32, false);109 107 public static final VInteger VDIRID = new VInteger("dirId", 1, true); 110 108 public static final VInteger VSPOTID = new VInteger("spotId", 0, false); … … 2154 2152 // Cleaning up from here 2155 2153 2156 public Form getImportHitsNonGelWizardStep1Form(Project project) 2157 { 2158 DbControl dc = project.getDbControl(); 2159 Form form = new Form("importHitsNonGelWizardStep1Form"); 2160 if (dc != null && dc.isConnected()) 2161 { 2162 // Properties fieldset 2163 Fieldset properties = new Fieldset("ImportHitsNonGelWizardStep1FormLegend"); 2164 form.addFieldset(properties); 2165 /* 2166 * Hidden text field for storing plugin id to use. 2167 */ 2168 TextField<Integer> pluginIdF = new PluginIdField(); 2169 PluginDefinition pluginDef = PluginDefinition.getByClassName( 2170 dc, 2171 "org.proteios.plugins.PeakListToHitNonGelPlugin"); 2172 pluginIdF.setValue(pluginDef.getId()); 2173 properties.add(pluginIdF); 2174 /* 2175 * This hidden text field sets title to be used for file selection 2176 * form. 2177 */ 2178 TextField<String> titleF = new TitleField("Step 1a. Select PeakList File[s]"); 2179 properties.add(titleF); 2180 /* 2181 * This hidden text field sets name to be used for the "Next" button 2182 * in the file selection form. 2183 */ 2184 TextField<String> buttonNameF = new NextButtonNameField(); 2185 buttonNameF.setValue("Import"); 2186 properties.add(buttonNameF); 2187 /* 2188 * This hidden forward field sets action id used by the file 2189 * selection action called by ImportHitsNonGelWizardStep1a. 2190 */ 2191 TextField<String> forwardF = new ForwardField(); 2192 forwardF.setValue(actionFactory 2193 .getId(ImportHitsNonGelWizardStep1b.class)); 2194 properties.add(forwardF); 2195 // Local sample id select box 2196 Select<VString> localSampleIdS = new LocalSampleSelect(Hit.getUniqueLocalSampleIds(project, dc)); 2197 localSampleIdS.setLabel("SelectLocalSampleId"); 2198 properties.add(localSampleIdS); 2199 // Local sample id entry field 2200 TextField<String> newLocalSampleIdF = getLocalSampleIdField(false); 2201 newLocalSampleIdF.setLabel("EnterNewLocalSampleId"); 2202 properties.add(newLocalSampleIdF); 2203 // Use regex fraction id parse pattern check box 2204 Checkbox<VBoolean> useRegexPatternCB = new Checkbox<VBoolean>( 2205 ImportHitsNonGelWizardStep1b.VUSEREGEXPATTERN); 2206 useRegexPatternCB.setLabel("ImportHitsNonGelWizardUseRegexPattern"); 2207 useRegexPatternCB.setValue("true"); 2208 useRegexPatternCB.isChecked(false); 2209 properties.add(useRegexPatternCB); 2210 // Optional regex pattern entry field 2211 TextField<String> regexPatternF = new RegexField(); 2212 regexPatternF.setLabel("ImportHitsNonGelWizardRegexPattern"); 2213 regexPatternF.setValue(".+\\_(.+)\\..+"); 2214 properties.add(regexPatternF); 2215 } 2216 return form; 2217 } 2218 2219 2154 2220 2155 public Form getImportHitsNonGelWizardStep2Form(Project project) 2221 2156 { … … 2951 2886 2952 2887 2953 2954 private TextField<String> getLocalSampleIdField(boolean isRequired)2955 {2956 TextField<String> field;2957 if (isRequired)2958 field = new TextField<String>(VREQUIRED_LOCALSAMPLEID);2959 else2960 field = new TextField<String>(VLOCALSAMPLEID);2961 field.setLabel("LocalSampleId");2962 return field;2963 }2964 2888 2965 2889
Note: See TracChangeset
for help on using the changeset viewer.