Changeset 2629
- Timestamp:
- 02/08/10 11:49:53 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molgenis/3.3/src/org/molgenis/framework/ui/SimpleModel.java
r2442 r2629 85 85 return (UserInterface) this.getRoot(); 86 86 } 87 87 88 88 @Override 89 89 public EmailService getEmailService() 90 90 { 91 return ((UserInterface) this.getRoot()).getEmailService();92 } 93 94 public FileLink getTempFile() throws IOException91 return ((UserInterface) this.getRoot()).getEmailService(); 92 } 93 94 public FileLink getTempFile() throws IOException 95 95 { 96 96 return getRootScreen().getTempFile(); … … 110 110 public String getLabel() 111 111 { 112 if (label == null) 113 return this.getName(); 112 if (label == null) return this.getName(); 114 113 return label; 115 114 } … … 158 157 if (getChildren().size() > 0) 159 158 { 160 if(getChildren().firstElement() instanceof ScreenModel) 161 return getChildren().firstElement(); 159 if (getChildren().firstElement() instanceof ScreenModel) return getChildren().firstElement(); 162 160 } 163 161 return null; … … 184 182 { 185 183 return selected.getName() == view.getName(); 186 } else 184 } 185 else 187 186 { 188 187 return false; … … 207 206 if (menubar.containsKey(menu_name) == false) 208 207 { 209 menubar.put(menu_name, new CommandMenu(menu_name, (FormModel) this, menu_name, "", ""));208 menubar.put(menu_name, new CommandMenu(menu_name, (FormModel) this, menu_name, "", "")); 210 209 } 211 210 212 211 // put the command in the menu 213 212 menubar.get(menu_name).addCommand(command); 214 this.logger.debug("added action " +command.getName());213 this.logger.debug("added action " + command.getName()); 215 214 } 216 215 … … 219 218 for (CommandMenu menu : menubar.values()) 220 219 { 221 if (menu.getCommand(commandID) != null) 222 return menu.getCommand(commandID); 220 if (menu.getCommand(commandID) != null) return menu.getCommand(commandID); 223 221 } 224 222 return null; … … 230 228 } 231 229 232 233 234 230 @Override 235 231 public String getViewTemplate() … … 237 233 return null; 238 234 } 239 240 @Override 241 public String getCustomHtmlHeaders() { 242 if(this.getSelected() != null) 235 236 @Override 237 public String getCustomHtmlHeaders() 238 { 239 if (this.getSelected() != null) 240 { 243 241 return this.getSelected().getCustomHtmlHeaders(); 244 return 245 ""; 242 } 243 else 244 { 245 String result = ""; 246 for(ScreenModel m: this.getChildren()) 247 { 248 result += m.getCustomHtmlHeaders(); 249 } 250 return result; 251 } 252 246 253 } 247 254 }
Note: See TracChangeset
for help on using the changeset viewer.