1 25 package org.ofbiz.webapp.taglib; 26 27 import java.io.IOException ; 28 import javax.servlet.jsp.JspException ; 29 import javax.servlet.jsp.tagext.TagSupport ; 30 31 import org.ofbiz.base.util.Debug; 32 import org.ofbiz.base.util.UtilJ2eeCompat; 33 import org.ofbiz.webapp.pseudotag.InputValue; 34 35 45 public class InputValueTag extends TagSupport { 46 47 public static final String module = InputValueTag.class.getName(); 48 49 private String field = null; 50 private String param = null; 51 private String entityAttr = null; 52 private String tryEntityAttr = null; 53 private String defaultStr = ""; 54 private String fullattrsStr = null; 55 56 public String getField() { 57 return field; 58 } 59 60 public void setField(String field) { 61 this.field = field; 62 } 63 64 public String getParam() { 65 return param; 66 } 67 68 public void setParam(String param) { 69 this.param = param; 70 } 71 72 public String getEntityAttr() { 73 return entityAttr; 74 } 75 76 public void setEntityAttr(String entityAttr) { 77 this.entityAttr = entityAttr; 78 } 79 80 public String getTryEntityAttr() { 81 return tryEntityAttr; 82 } 83 84 public void setTryEntityAttr(String tryEntityAttr) { 85 this.tryEntityAttr = tryEntityAttr; 86 } 87 88 public String getDefault() { 89 return defaultStr; 90 } 91 92 public void setDefault(String defaultStr) { 93 this.defaultStr = defaultStr; 94 } 95 96 public String getFullattrs() { 97 return fullattrsStr; 98 } 99 100 public void setFullattrs(String fullattrsStr) { 101 this.fullattrsStr = fullattrsStr; 102 } 103 104 public int doStartTag() throws JspException { 105 try { 106 InputValue.run(field, param, entityAttr, tryEntityAttr, defaultStr, fullattrsStr, pageContext); 107 } catch (IOException e) { 108 if (UtilJ2eeCompat.useNestedJspException(pageContext.getServletContext())) { 109 throw new JspException (e.getMessage(), e); 110 } else { 111 Debug.logError(e, "Server does not support nested exceptions, here is the exception", module); 112 throw new JspException (e.toString()); 113 } 114 } 115 116 return (SKIP_BODY); 117 } 118 } 119 120 | Popular Tags |