permaculture playing cards*
The moose likes Struts and the fly likes Html struts tags attribuits Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Html struts tags attribuits" Watch "Html struts tags attribuits" New topic
Author

Html struts tags attribuits

Rami Hailat
Greenhorn

Joined: Nov 26, 2008
Posts: 20
All of us know that using html struts tag like this
will be rendered in HTML like this What i want is to add some attribute in the HTML struts tags to be just copied to the corresponding rendered HTML tag. Is that possible ?


example to be
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
No, you cannot.

The custom tag is rendered based on the TLD file which holds its definition. Any attribute that you add which is not a part of the TLD for this tag [like the validate attribute you added in the example] will not be tolerated by struts, and an exception will be thrown at runtime.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Note that the same isn't true for some S2 tags, but the S1 tags haven't gotten dynamic attribute support as of yet.
Rami Hailat
Greenhorn

Joined: Nov 26, 2008
Posts: 20
Thank you
 
jQuery in Action, 2nd edition
 
subject: Html struts tags attribuits