struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burton Rhodes <>
Subject [S2] How to add a custom parameter to an existing Struts UI Tag?
Date Sat, 09 Oct 2010 18:51:04 GMT
I am trying to override a struts tag template (specifically
<s:checkboxlist>), and I can't figure out how to add a parameter to
the tag.  I have successfully overridden the template by copying
"checkboxlist.tld" to my template/simple directory and all works well.
 Now I would like to add a parameter.  It appears that I need to
override the the META-INF/struts-tags.tld file because I keep getting
the error below.  However, using the same method as checkboxlist.tld,
I copy a modified version of struts-tags.tld to my
META-INF/struts-tags.tld directory.  However, I still get the same
error below.  Not sure if I need to modify another file or if
struts-tags.tld cannot be "overridden".  Anyone given this a try?
Trying not to have to create a new custom tag since all I want is a
simple modification to checkboxlist.tld.

/contact/contactCreate.jsp(286,6) PWC6131: Attribute breakCount
invalid for tag checkboxlist according to TLD

Caused by:
org.apache.jasper.JasperException: /contact/contactCreate.jsp(286,6)
PWC6131: Attribute breakCount invalid for tag checkboxlist according
to TLD

Tag with added parameter (breakCount):

	breakCount="3"           <!-- New Parameter, will enter the
breakString after every 3 items -->

Excerpt from modified "struts-tags.tld":
    <description><![CDATA[Render a list of checkboxes]]></description>
      <description><![CDATA[Set the html accesskey attribute on
rendered html element]]></description>
      <description><![CDATA[Number of elements to display before
inserting 'break' element.]]></description>
      <description><![CDATA[Used to override the default 'break'
string. Default is <br>.]]></description>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message