1 package net.sourceforge.formview.displayer; 2 3 import java.util.Map ; 4 5 import net.sourceforge.formview.FieldView; 6 7 13 public class Property extends BaseElement { 14 15 private String behaviours; 16 17 public String getBehaviours() { 18 return behaviours; 19 } 20 21 public void setBehaviours(String behaviours) { 22 this.behaviours = behaviours; 23 } 24 public String toString() { 25 StringBuffer results = new StringBuffer (super.toString()); 26 results.append("\t\tbehaviours = " + behaviours + "\n"); 27 return results.toString(); 28 } 29 30 public void processHTML(FieldView field, String defaultBehaviour, Map contextValuesMap, StringBuffer htmlContentToInsertBefore, StringBuffer htmlContentToInsertAfter, StringBuffer htmlContentToReplace, Map attributeMap) { 31 String behaviour = defaultBehaviour; 33 if (field != null && field.getBehaviour() != null) { 34 behaviour = field.getBehaviour(); 35 } 36 if (behaviours != null && behaviours.length() > 0 && 37 behaviour != null && behaviour.length() > 0) { 38 if (behaviours.indexOf(behaviour) == -1) 40 return; 41 } 42 43 if (field != null) { 44 if (field.isDependsOn(getName())) { 46 super.processHTML(field, defaultBehaviour, contextValuesMap, htmlContentToInsertBefore, htmlContentToInsertAfter, htmlContentToReplace, attributeMap); 47 } 48 } 49 } 50 51 52 } 53 | Popular Tags |