Dear All,
I have been struggling with this all day, It'll take a bit of background to explain
what I am trying to do:
I am creating an online wizard to populate templatised web pages, and hence create a
dynamic struts/tiles-based site.
Each template has various containers for content, each container can be filled by a
set of different tiles. The templates are defined in a database. The definition for a
template associates each container with the category of tile that it can hold, for
instance a template may have containers for navigation and menu tiles. The database
also contains a list of tiles that fit into each category of container.
I would like to create a single form that lists the categories, that has radio button
for every tile in each category.
My code looks like this:
<logic:iterate id="elementCategory" name="selectedTemplate"
property="elementCategories"
type="com.db.gci.ge.epg.actions.addcontent.TemplateElementCategory">
<p>
<b><bean:write name="elementCategory" property="category" /></b>
<bean:write name="elementCategory" property="description" />
Compatible elements in this category:<br>
<ul>
<logic:iterate id="compatibleElement" name="elementCategory"
property="compatibleElements"
type="com.db.gci.ge.epg.actions.addcontent.TemplateElement">
<html:radio property="value(<%= elementCategory.getName() %>)"
idName="compatibleElement" value="name" >
<b><bean:write name="compatibleElement" property="name" /></b><br>
<bean:write name="compatibleElement" property="description" />
</html:radio>
</logic:iterate>
</ul>
</p>
</logic:iterate>
The issue is this:
I need to make the action form map-backed (I think) because the number of radio
buttons is only know at runtime, but I can't find any way to name the radio buttons by
the name of the category that is being selected. What I would like to use is value(<%=
elementCategory.getName() %>) where my action form has a map and a setValue(String
key, Object object) function.
Thanks in advance, Paul
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]