I know I can get JP tag attributes with setXXX() method but I want to know if it is possible to modify attribute values within a tag handler.

Alessandro A. Garbagnati

It is possible. From inside a custom tag you have access to the pageContext object, that will allow you to have access to all the objects in all the different attribute scopes:

pageContext.getAttribute(name, scope)

where scope can be one of the following:


Normally in the iteration tag you would insert the bean (or whatever you need) in the page attribute scope and inside your tag you get that and you play with it... This is the easiest way.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact