Changeset 3768
- Timestamp:
- Aug 17, 2010, 11:26:20 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/api/waf/src/se/lu/thep/waf/HtmlTagWriter.java
r3759 r3768 74 74 public void draw(Tag tag) 75 75 { 76 indent++; 76 77 if (tag instanceof CData) 77 78 { … … 88 89 for (Tag child : elements) 89 90 { 90 indent++;91 91 child.draw(this); 92 92 } … … 94 94 { 95 95 writeEndTag(writer, tag); 96 indent--;97 96 } 98 97 } 98 indent--; 99 99 } 100 100 … … 113 113 sb.append(">"); 114 114 else 115 sb.append(" \n>");115 sb.append(">\n"); 116 116 } 117 117 else -
trunk/client/servlet/src/org/proteios/action/mascot/SaveMascotParameterSetStorage.java
r3297 r3768 48 48 import org.proteios.gui.Toolbar; 49 49 import org.proteios.gui.form.Form; 50 import org.proteios.gui.form.Fieldset; 51 import org.proteios.gui.form.TextField; 50 52 import org.proteios.gui.form.FormFactory; 51 53 import org.proteios.gui.layout.RowLayout; … … 125 127 throws ActionException, InvalidParameterValue 126 128 { 127 /* 128 * Get the Mascot parameter set storage 129 */ 130 log.debug("########## - Start"); 131 //Integer mascotpssId = getSessionAttribute(ViewActiveMascotParameterSetStorage.VMASCOTPARAMETERSETSTORAGEID); 132 Integer mascotpssId = getValidInteger(ViewActiveMascotParameterSetStorage.VMASCOTPARAMETERSETSTORAGEID); 129 130 Integer mascotpssId; 131 Boolean saveMascotParameterSetFlag; 132 Boolean saveAsMascotParameterSetFlag; 133 Boolean useWebInterfaceFlag; 134 List<Integer> spectrumFileIds; 135 String forwardId, mascotSearchUserName, mascotSearchUserEmail, errorMessage, saveLabel; 136 DbControl dc; 137 ItemFactory factory; 138 MascotParameterSetStorage mascotpss; 139 MascotParameterSet mascotParameterSet; 140 Form form; 141 Toolbar tb; 142 RowLayout layout; 143 ActionLink action, forwardLink, saveAction; 144 // Define 145 146 mascotpssId = getValidInteger(ViewActiveMascotParameterSetStorage.VMASCOTPARAMETERSETSTORAGEID); 147 saveMascotParameterSetFlag = getValidBoolean(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG); 148 saveAsMascotParameterSetFlag = getValidBoolean(SearchMascot.VSAVEASMASCOTPARAMETERSETFLAG); 149 forwardId = getValidString(FormFactory.VFWDACTION); 150 spectrumFileIds = getValidIntegerList(SearchMascot.VSPECTRUMFILEID); 151 useWebInterfaceFlag = getValidBoolean(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG); 152 mascotSearchUserName = getValidString(SearchMascot.VMASCOT_SEARCH_USER_NAME); 153 mascotSearchUserEmail = getValidString(SearchMascot.VMASCOT_SEARCH_USER_EMAIL); 154 155 if (saveMascotParameterSetFlag == null) { saveMascotParameterSetFlag = false; } 156 if (saveAsMascotParameterSetFlag == null) { saveAsMascotParameterSetFlag = false; } 157 133 158 log.debug("mascotParameterSetStorageId = " + mascotpssId); 134 // Get the save Mascot parameter set flag135 Boolean saveMascotParameterSetFlag = getValidBoolean(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG);136 log.debug("saveMascotParameterSetFlag from request = " + saveMascotParameterSetFlag);137 if (saveMascotParameterSetFlag == null)138 {139 saveMascotParameterSetFlag = false;140 }141 159 log.debug("saveMascotParameterSetFlag = " + saveMascotParameterSetFlag); 142 // Get the "save as" Mascot parameter set flag143 Boolean saveAsMascotParameterSetFlag = getValidBoolean(SearchMascot.VSAVEASMASCOTPARAMETERSETFLAG);144 log.debug("saveAsMascotParameterSetFlag from request = " + saveAsMascotParameterSetFlag);145 if (saveAsMascotParameterSetFlag == null)146 {147 saveAsMascotParameterSetFlag = false;148 }149 160 log.debug("saveAsMascotParameterSetFlag = " + saveAsMascotParameterSetFlag); 150 String forwardId = getValidString(FormFactory.VFWDACTION);151 // Get the forward id152 161 log.debug("forwardId = " + forwardId); 153 /*154 * Get parameters that might need to be forwarded to next action155 */156 // Get the spectrum file items to use for the search157 List<Integer> spectrumFileIds = getValidIntegerList(SearchMascot.VSPECTRUMFILEID);158 162 log.debug("spectrumFileIds = " + spectrumFileIds); 159 // Get the Mascot web interface flag 160 Boolean useWebInterfaceFlag = getValidBoolean(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG); 161 log.debug("useWebInterfaceFlag from request = " + useWebInterfaceFlag); 162 // Get Mascot search user name 163 String mascotSearchUserName = getValidString(SearchMascot.VMASCOT_SEARCH_USER_NAME); 164 log.debug("mascotSearchUserName from request = \"" + mascotSearchUserName + "\""); 165 // Get Mascot search user email 166 String mascotSearchUserEmail = getValidString(SearchMascot.VMASCOT_SEARCH_USER_EMAIL); 167 log.debug("mascotSearchUserEmail from request = \"" + mascotSearchUserEmail + "\""); 168 //Integer eventId = getValidInteger(FormFactory.VID); 169 DbControl dc = newDbControl(); 170 ItemFactory factory = getItemFactory(dc); 171 //UpdateEvent ue = factory.getById(UpdateEvent.class, eventId); 172 //MascotParameterSetStorage mascotpss = factory.getById(MascotParameterSetStorage.class, mascotpssId); 173 MascotParameterSetStorage mascotpss = null; 163 log.debug("useWebInterfaceFlag from request = " + useWebInterfaceFlag); 164 log.debug("mascotSearchUserName from request = \"" + mascotSearchUserName + "\""); 165 log.debug("mascotSearchUserEmail from request = \"" + mascotSearchUserEmail + "\""); 166 // Here 167 dc = newDbControl(); 168 factory = getItemFactory(dc); 169 mascotpss = null; 174 170 if (mascotpssId != null) 175 171 { … … 177 173 } 178 174 // Fetch current Mascot parameter set from request 179 MascotParameterSetmascotParameterSet = fetchCurrentMascotParameterSet();180 // 181 StringerrorMessage = null;175 mascotParameterSet = fetchCurrentMascotParameterSet(); 176 // 177 errorMessage = null; 182 178 if (saveAsMascotParameterSetFlag) 183 179 { … … 193 189 log.debug("mascotpss.getParameterFile() = \"" + mascotpss.getParameterFile() + "\""); 194 190 // MascotParameterSetStorage form 195 //Form form = getFormFactory().getSaveAsMascotParameterSetStorageForm(mascotParameterSetStorage, mascotParameterSet); 196 Form form = getFormFactory().getSaveAsMascotParameterSetStorageForm(mascotpss, mascotParameterSet); 191 form = getFormFactory().getSaveAsMascotParameterSetStorageForm(mascotpss, mascotParameterSet); 197 192 // Toolbar 198 Toolbartb = new Toolbar();193 tb = new Toolbar(); 199 194 // Save button 200 String saveLabel = "Save"; 201 ActionLink saveAction = getActionFactory().getActionLink(SaveMascotParameterSetStorage.class, saveLabel); 202 //saveAction.addParameter(ViewActiveMascotParameterSetStorage.VMASCOTPARAMETERSETSTORAGEID, 203 // mascotpssId); 195 saveLabel = "Save"; 196 saveAction = getActionFactory().getActionLink(SaveMascotParameterSetStorage.class, saveLabel); 204 197 saveAction.addParameter(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG, 205 198 true); … … 212 205 for (Integer spectrumFileId : spectrumFileIds) 213 206 { 214 saveAction.addParameter(SearchMascot.VSPECTRUMFILEID, spectrumFileId);207 form.getFieldsets().get(0).add(new TextField<Integer>(SearchMascot.VSPECTRUMFILEID, spectrumFileId).setHidden(true)); 215 208 } 216 209 } … … 227 220 form.setToolbar(tb); 228 221 // Layout 229 RowLayoutlayout = getLayoutFactory().getRowLayout();222 layout = getLayoutFactory().getRowLayout(); 230 223 layout.add(new Title("SaveAsMascotParameterSetStorage")); 231 224 layout.add(form); … … 391 384 // Return to "Save As..." form and display error message 392 385 setError(errorMessage); 393 StringsaveLabel = "Save";394 ActionLinkaction = getActionFactory().getActionLink(SaveMascotParameterSetStorage.class, saveLabel);386 saveLabel = "Save"; 387 action = getActionFactory().getActionLink(SaveMascotParameterSetStorage.class, saveLabel); 395 388 setAttribute(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG, 396 389 false); … … 413 406 { 414 407 log.debug("forwardId != null, calling setForwardTo(forwardId = " + forwardId + ")"); 415 ActionLinkforwardLink = new ActionLink("forward",408 forwardLink = new ActionLink("forward", 416 409 forwardId); 417 410 forwardLink.addParameter(ViewActiveMascotParameterSetStorage.VMASCOTPARAMETERSETSTORAGEID, mascotpssId); … … 434 427 { 435 428 log.debug("forwardId == null, calling setForwardTo(ViewActiveMascotParameterSetStorage.class)"); 436 ActionLinkforwardLink = getActionLink(ViewActiveMascotParameterSetStorage.class, "forward");429 forwardLink = getActionLink(ViewActiveMascotParameterSetStorage.class, "forward"); 437 430 setForwardTo(forwardLink.getActionId()); 438 431 } -
trunk/client/servlet/src/org/proteios/action/mascot/SearchMascot.java
r3763 r3768 270 270 //job.setName(plugin.getName() + " File: " + file.getName()); 271 271 //job.setDescription("Gel: " + gelId + " File: " + file.getName()); 272 job.setName( plugin.getName() + " Mascot Parameter Set: " + mascotpss.getName());273 job.setDescription("Mascot Parameter Set: " + mascotpss.getName() + "[" + mascotpss.getId() + "] Spectrum File: " + spectrumFile.getName() + "[" + spectrumFile.getId() + "]");272 job.setName("Mascot Search: " + mascotpss.getName()); 273 job.setDescription("Mascot Parameter Set: " + mascotpss.getName() + "[" + mascotpss.getId() + "]\n Spectrum File: " + spectrumFile.getName() + "[" + spectrumFile.getId() + "]"); 274 274 // 275 275 StringParameterType mascotWebServerURLStrParam = new StringParameterType(); -
trunk/client/servlet/src/org/proteios/action/mascot/ViewActiveMascotParameterSetStorage.java
r3767 r3768 37 37 import org.proteios.gui.form.Form; 38 38 import org.proteios.gui.form.FormFactory; 39 import org.proteios.gui.form.Fieldset; 39 40 import org.proteios.gui.form.Option; 41 import org.proteios.gui.form.TextField; 40 42 import org.proteios.gui.layout.RowLayout; 41 43 import org.proteios.io.MascotParameterSet; … … 50 52 51 53 /** 52 * @author olle 54 * @author olle, gregory 53 55 */ 54 56 public class ViewActiveMascotParameterSetStorage … … 108 110 List<String> reportTopStringList; 109 111 List<Option> reportTopOptionList; 112 Fieldset fs; 110 113 // Define 111 114 … … 218 221 */ 219 222 toolbar = new Toolbar(); 223 fs = mascotParameterSetForm.getFieldsets().get(0); 224 fs.add(new TextField<Integer>(VMASCOTPARAMETERSETSTORAGEID, mascotpssId).setHidden(true)); 225 fs.add(new TextField<String>(SearchMascot.VMASCOT_SEARCH_USER_NAME, mascotSearchUserName).setHidden(true)); 226 fs.add(new TextField<String>(SearchMascot.VMASCOT_SEARCH_USER_EMAIL, mascotSearchUserEmail).setHidden(true)); 227 220 228 if (spectrumFileIds == null) 221 229 { 222 230 // Save Mascot parameter set button 223 231 save = getActionLink(SaveMascotParameterSetStorage.class, "Save"); 224 save.addParameter(VMASCOTPARAMETERSETSTORAGEID, mascotpssId);225 save.addParameter(SearchMascot.VMASCOT_SEARCH_USER_NAME, mascotSearchUserName);226 save.addParameter(SearchMascot.VMASCOT_SEARCH_USER_EMAIL, mascotSearchUserEmail);227 232 save.addParameter(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG, true); 228 233 save.addParameter(FormFactory.VFWDACTION, ViewActiveMascotParameterSetStorage.class.getName()); … … 230 235 // "Save As" Mascot parameter set button 231 236 saveAs = getActionLink(SaveMascotParameterSetStorage.class, "SaveAs"); 232 saveAs.addParameter(VMASCOTPARAMETERSETSTORAGEID, mascotpssId);233 saveAs.addParameter(SearchMascot.VMASCOT_SEARCH_USER_NAME, mascotSearchUserName);234 saveAs.addParameter(SearchMascot.VMASCOT_SEARCH_USER_EMAIL, mascotSearchUserEmail);235 237 saveAs.addParameter(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG, false); 236 238 saveAs.addParameter(SearchMascot.VSAVEASMASCOTPARAMETERSETFLAG, true); … … 240 242 else 241 243 { 244 // Add file ids as hidden fields to the form 245 for (Integer spectrumFileId : spectrumFileIds) 246 { 247 TextField<Integer> hiddenFileField = new TextField<Integer>(SearchMascot.VSPECTRUMFILEID, spectrumFileId).setHidden(true); 248 fs.add(hiddenFileField); 249 } 250 fs.add(new TextField<Boolean>(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG, useWebInterfaceFlag).setHidden(true)); 242 251 // Save and Search Mascot 243 252 searchMascot = getActionLink(SaveMascotParameterSetStorage.class, "SaveAndSearchMascot"); 244 searchMascot.addParameter(VMASCOTPARAMETERSETSTORAGEID, mascotpssId);245 searchMascot.addParameter(SearchMascot.VMASCOT_SEARCH_USER_NAME, mascotSearchUserName);246 searchMascot.addParameter(SearchMascot.VMASCOT_SEARCH_USER_EMAIL, mascotSearchUserEmail);247 253 searchMascot.addParameter(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG, true); 248 254 searchMascot.addParameter(FormFactory.VFWDACTION, SearchMascot.class.getName()); 249 for (Integer spectrumFileId : spectrumFileIds)250 {251 searchMascot.addParameter(SearchMascot.VSPECTRUMFILEID, spectrumFileId);252 }253 searchMascot.addParameter(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG, useWebInterfaceFlag);254 255 toolbar.add(searchMascot); 255 256 // "Save As" and Search Mascot 256 257 saveAsAndSearchMascot = getActionLink(SaveMascotParameterSetStorage.class, "SaveAsAndSearchMascot"); 257 saveAsAndSearchMascot.addParameter(VMASCOTPARAMETERSETSTORAGEID, mascotpssId);258 saveAsAndSearchMascot.addParameter(SearchMascot.VMASCOT_SEARCH_USER_NAME, mascotSearchUserName);259 saveAsAndSearchMascot.addParameter(SearchMascot.VMASCOT_SEARCH_USER_EMAIL, mascotSearchUserEmail);260 258 saveAsAndSearchMascot.addParameter(SearchMascot.VSAVEMASCOTPARAMETERSETFLAG, false); 261 259 saveAsAndSearchMascot.addParameter(SearchMascot.VSAVEASMASCOTPARAMETERSETFLAG, true); 262 260 saveAsAndSearchMascot.addParameter(FormFactory.VFWDACTION, SearchMascot.class.getName()); 263 for (Integer spectrumFileId : spectrumFileIds)264 {265 saveAsAndSearchMascot.addParameter(SearchMascot.VSPECTRUMFILEID, spectrumFileId);266 }267 saveAsAndSearchMascot.addParameter(SearchMascot.VMASCOTUSEWEBINTERFACEFLAG, useWebInterfaceFlag);268 261 toolbar.add(saveAsAndSearchMascot); 269 262 } -
trunk/client/servlet/src/org/proteios/gui/form/TextField.java
r3593 r3768 52 52 53 53 54 public TextField(VParameter v email)54 public TextField(VParameter vparam) 55 55 { 56 super(vemail); 56 super(vparam); 57 } 58 59 public TextField(VParameter vparam, D value) 60 { 61 super(vparam); 62 setValue(value); 57 63 } 58 64
Note: See TracChangeset
for help on using the changeset viewer.