I tried to combine
Struts Tags & Custom Tags, but i guess it's not possible to struts to bind the struts tags values to the
jsp, isn't it?
I have this class:
public class InputTextTag extends TagSupport {
private
String property;
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public InputTextTag() {
}
public int doStartTag() throws JspException {
try {
JspWriter out = pageContext.getOut();
StringBuffer sb = new StringBuffer();
sb.append("<input type=\"text\"");
sb.append(" name=\""+ property + "\"" );
if (styleId!=null) {
sb.append(" id=\""+ property + "\"" );
} else {
sb.append(" id=\""+ styleId + "\"" );
}
sb.append(" onblur=\"javascript:onBlurEvent(this)\"");
sb.append(" onfocus=\"javascript:onFocusEvent(this)\"");
sb.append(" >");
out.print(sb.toString());
} catch (IOException ioe) {
throw new JspException("Error:IOException while writing to client");
}
return EVAL_PAGE;
}
public int doEndTag() throws JspException {
return EVAL_PAGE;
}
public void release() {
}
public void setPageContext(PageContext pageContext) {
this.pageContext = pageContext;
}
}
using strugs tag in the jsp
<html:text property="shortName" /> the value is NOT empty
using my tag in the jsp:
<myTag:text property="shortName" /> the value is empty
<br>
I guess there is no solution