1 package fr.improve.struts.taglib.layout.field; 2 3 import javax.servlet.jsp.JspException ; 4 5 import fr.improve.struts.taglib.layout.util.LayoutUtils; 6 10 public abstract class AbstractUniqueSelectTag extends AbstractSelectTag { 11 protected String match; 12 private String value; 13 14 19 public java.lang.String getMatch() { 20 return match; 21 } 22 26 protected Object getFieldValue() throws JspException { 27 Object lc_value; 28 if (match!=null) { 29 lc_value = match; 30 } else if (value!=null) { 31 lc_value = value; 32 match = value; 33 } else { 34 lc_value = LayoutUtils.getBeanFromPageContext(pageContext, name, property); 35 if (lc_value==null) match = ""; else match = lc_value.toString(); 36 } 37 if (lc_value!=null && lc_value.toString().length()==0) return null; 38 return lc_value; 39 } 40 protected void reset() { 41 super.reset(); 42 match = null; 43 } 44 45 public void release() { 46 super.release(); 47 value = null; 48 } 49 50 55 public void setMatch(java.lang.String newMatch) { 56 match = newMatch; 57 } 58 59 63 public final String getValue() { 64 return value; 65 } 66 67 71 public final void setValue(String value) { 72 this.value = value; 73 } 74 75 } 76 | Popular Tags |