wood burning stoves 2.0*
The moose likes Struts and the fly likes combining Struts Tags & Custom Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "combining Struts Tags & Custom Tags" Watch "combining Struts Tags & Custom Tags" New topic
Author

combining Struts Tags & Custom Tags

bela lugosi
Greenhorn

Joined: Jul 13, 2009
Posts: 1
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=\"javascriptnBlurEvent(this)\"");
sb.append(" onfocus=\"javascriptnFocusEvent(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


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: combining Struts Tags & Custom Tags
 
Similar Threads
Unable to locate setter methof for attribute lock in the tag class
Custom Tag Iterator is so slow.
Using EL to generate attribute/value pairs inside of an XHTML element
Internal server error
problem in tags,please help!!!