Changeset 2629


Ignore:
Timestamp:
02/08/10 11:49:53 (2 years ago)
Author:
mswertz
Message:

Bugfix getCustomHtmlHeaders

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molgenis/3.3/src/org/molgenis/framework/ui/SimpleModel.java

    r2442 r2629  
    8585                return (UserInterface) this.getRoot(); 
    8686        } 
    87          
     87 
    8888        @Override 
    8989        public EmailService getEmailService() 
    9090        { 
    91                 return ((UserInterface)this.getRoot()).getEmailService(); 
    92         } 
    93  
    94         public FileLink getTempFile()  throws IOException 
     91                return ((UserInterface) this.getRoot()).getEmailService(); 
     92        } 
     93 
     94        public FileLink getTempFile() throws IOException 
    9595        { 
    9696                return getRootScreen().getTempFile(); 
     
    110110        public String getLabel() 
    111111        { 
    112                 if (label == null) 
    113                         return this.getName(); 
     112                if (label == null) return this.getName(); 
    114113                return label; 
    115114        } 
     
    158157                if (getChildren().size() > 0) 
    159158                { 
    160                         if(getChildren().firstElement() instanceof ScreenModel) 
    161                                 return getChildren().firstElement(); 
     159                        if (getChildren().firstElement() instanceof ScreenModel) return getChildren().firstElement(); 
    162160                } 
    163161                return null; 
     
    184182                { 
    185183                        return selected.getName() == view.getName(); 
    186                 } else 
     184                } 
     185                else 
    187186                { 
    188187                        return false; 
     
    207206                if (menubar.containsKey(menu_name) == false) 
    208207                { 
    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, "", "")); 
    210209                } 
    211210 
    212211                // put the command in the menu 
    213212                menubar.get(menu_name).addCommand(command); 
    214                 this.logger.debug("added action "+command.getName()); 
     213                this.logger.debug("added action " + command.getName()); 
    215214        } 
    216215 
     
    219218                for (CommandMenu menu : menubar.values()) 
    220219                { 
    221                         if (menu.getCommand(commandID) != null) 
    222                                 return menu.getCommand(commandID); 
     220                        if (menu.getCommand(commandID) != null) return menu.getCommand(commandID); 
    223221                } 
    224222                return null; 
     
    230228        } 
    231229 
    232  
    233  
    234230        @Override 
    235231        public String getViewTemplate() 
     
    237233                return null; 
    238234        } 
    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                { 
    243241                        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 
    246253        } 
    247254} 
Note: See TracChangeset for help on using the changeset viewer.