File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes jsp customtag as an attribute? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp customtag as an attribute?" Watch "jsp customtag as an attribute?" New topic
Author

jsp customtag as an attribute?

Markus Meier
Greenhorn

Joined: Aug 10, 2001
Posts: 2
Hi Folks
Does anybody know, if I can use a CustomTag as a value of an attribute for an other CustomTag?
something like this?
<ejob:CheckboxTag translator="CarTranslator" field="<ejob:CheckboxTag column='DRIVING_LICENCE' />" />
------------------
-----
...may the source be with you


-----<BR>...may the source be with you
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Attributes can be a primitive type or any Java object, and they can be set statically (i.e. hard-coded in the JSP) or dynamically at request-time using JSP expressions. At the moment, using tags as attributes isn't possible.
What you can so though is make your tags co-operate in other ways. For example, you could nest your tags, or make them share information (implicitly or explicitly) through scripting variables on the page, or even the HTTP session.
Alternatively, take a look at some of the Standard TagLib stuff going on over at http://jakarta.apache.org/taglibs/doc/jsptl-doc/intro.html , or the summary that's available on the Wrox Press website at http://www.wrox.com/News/viewReview.asp?art_type=new&id=583 . It has its own "expression language" for accessing variables, etc.
Hope that helps...
Simon
 
jQuery in Action, 2nd edition
 
subject: jsp customtag as an attribute?
 
Similar Threads
Doubts
JSP Tag that contains result of another
How can we set a Collection object as attribute to be used by a custom tag?
Doubts in JSTL
Regarding Custom Tag