This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
<a:text value="<a:value attribute="attr1"/>"/> it is possible to have the value output by a:value tag to be used by a:text tag at all?? or we will have to have something like <a:text> <value="<a:value attribute="attr1"/> </a:text>
Originally posted by cj jack: Correct me if I am wrong, but I was under the impression that a value for an attribute can only be set to a scriptlet expression or a static(literal) value.
That's right - a literal value or a JSP runtime expression, although with the JSTL and JSP 2.0 you can use the included "expression language". In answer to the original question, you can't have the result/evaluation of a tag as an attribute to another - this would effectively require a two stage translation of the page, and there's nothing to say that a tag will actually generate any content. To specify complex values, you can either use a JSP runtime expression (<%= ... %> ) or nest the tags as follows: <a:text> <a:value attribute="attr1"/> </a:text> There are several ways of making this type of thing work - (1) have the <a:value> tag pass the data to it's parent, or (2) make <a:text> a BodyTag, have <a:value> generate some content and read this generated body content in the doEndTag() method of the <a:text> tag handler. Hope that helps... Simon [ June 24, 2002: Message edited by: Simon Brown ]