1 19 package org.openbravo.erpCommon.ad_forms; 20 21 import org.openbravo.data.FieldProvider; 22 import org.apache.log4j.Logger ; 23 24 class ShowSessionStructureData implements FieldProvider { 25 static Logger log4j = Logger.getLogger(ShowSessionStructureData.class); 26 boolean isPreference = false; 27 boolean isAccounting = false; 28 boolean isGlobal = false; 29 String window; 30 String windowName; 31 String completeName; 32 String name; 33 String value; 34 35 36 public String getField(String fieldName) { 37 if (fieldName.equalsIgnoreCase("isPreference")) 38 return (isPreference?"SI":"NO"); 39 else if (fieldName.equalsIgnoreCase("isAccounting")) 40 return (isAccounting?"SI":"NO"); 41 else if (fieldName.equalsIgnoreCase("isGlobal")) 42 return (isGlobal?"SI":"NO"); 43 else if (fieldName.equalsIgnoreCase("window")) 44 return ((window==null)?"":window); 45 else if (fieldName.equalsIgnoreCase("windowName")) 46 return ((windowName==null)?"":windowName); 47 else if (fieldName.equalsIgnoreCase("completeName")) 48 return ((completeName==null)?"":completeName); 49 else if (fieldName.equalsIgnoreCase("name")) 50 return ((name==null)?"":name); 51 else if (fieldName.equalsIgnoreCase("value")) 52 return ((value==null)?"":value); 53 else { 54 if (log4j.isDebugEnabled()) log4j.debug("Field does not exist: " + fieldName); 55 return null; 56 } 57 } 58 } 59 | Popular Tags |