Ignore:
Timestamp:
Apr 9, 2010, 10:56:07 AM (14 years ago)
Author:
tobias
Message:

visual design slightly modified. tree functions extended

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/BeanUtil.java

    r857 r858  
    3838                return bundle;
    3939        }
     40        public static boolean getRequired(String type, String key){
     41                String s = getFieldProperty(type, key, 2);
     42                if (s.equals("true") )return true;
     43                return false;
     44        }
    4045        //getRenderer returns rendererType based on properties
    4146        public static String getRenderer(String type, String key){
     47                return getFieldProperty(type, key, 1);
     48        }
     49        public static String getFieldProperty(String type, String key, int i){
    4250                String daemon = "director";
    4351                String res = "inputText";
     
    5159                key = key.toLowerCase();
    5260                String result[] = getProperties((daemon+"."+type+"."+key));
    53                 if (result[1].equals("boolean")){
    54                         return "radioGroup";
     61                if (i == 1) {
     62                        if (result[1].equals("boolean")){
     63                                return "radioGroup";
     64                        }
     65                        if (!(result[0].equals("0"))){
     66                                return "selectOneMenu";
     67                        }               
     68                        return res;
    5569                }
    56                 if (!(result[0].equals("0"))){
    57                         return "selectOneMenu";
    58                 }
    59                
     70                if (i == 2) return result[2];
    6071                return res;
    6172        }
     73       
    6274    //Statusmeldungen an den Client
    6375    public static void setInfoMessage(String client, String message){
     
    7890        }
    7991       
     92        public static String getAccessType(String type){
     93                if (type.equals("jobdefs")) return "job";
     94                return type;
     95        }
     96       
    8097}
Note: See TracChangeset for help on using the changeset viewer.