• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

nested struts tags

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Can we use nested tags in Struts?
For example, i have a drop down menu. the current value of that dropdown comes from a property of a value object which is an element of a collection of custom value objects.
here's the code for that:
<logic:iterate id="testInfo" name="applicantForm" property="applicantTestInfo">

<html:select property="testId">
<html ption value="<bean:write name="testInfo"
property="testTypeId"/>"/>

<html ptions collection="testCodes" property="key" labelProperty="value"/>
</html:select>
</logic:iterate>
In the above snippet, i am not able to use the nested <bean:write tag in the html ption value tag.
Can anyone suggest how to use nested tags?
Thanks in advance,
Seshu
 
Sheriff
Posts: 17734
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you can't nest tags that way; and that's not a Struts limitation, it's true for JSP tags in general. This question has come up a number of times before. Please do a search in this forum or in the JSP forum for suggestions on how to get around this (search for "nested tags") .
reply
    Bookmark Topic Watch Topic
  • New Topic