wood burning stoves 2.0*
The moose likes Struts and the fly likes tags as other tags' attribute value 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 "tags as other tags Watch "tags as other tags New topic
Author

tags as other tags' attribute value

Kaiser Lautern
Greenhorn

Joined: May 11, 2005
Posts: 18
Hi, people,

Maybe this is a recurring question but I didn't manage to find the right keywords, so I'm gonna (re)post it.

I learned that custom tags don't accept other tags as their attribute values. So I can't write something like:

<myTag rocess att1='<bean:write name="att1id"/>'
att2='<bean:write name="att2id"/>'
att3 ='<bean:write name="att3id"/>'
/>
Is that correct?

The problem is that I changed the bean:write tags above to scripting variables (like <%=att1id%> but the tag handler is still getting the string "<%=att1id%>" instead of the content of the string attribute (like the parser is not parsing).

Can anybody help me?

Thanks in advance,

Kaiser
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you want your custom tag to accept a scriptlet as one of it's attributes, you must include:

<rtexprvalue>true</rtexprvalue>

with the definition of that attribute in your .tld file.


Merrill
Consultant, Sima Solutions
Kaiser Lautern
Greenhorn

Joined: May 11, 2005
Posts: 18
Thanks Merril,

That's exactly what was missing in my tld to make it work.

Kaiser
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tags as other tags' attribute value