Hi Pedro,

I would be very grateful if you could send me the code.

Thanks, Paul



                                                                                       
                                                                                       
                                 
                      Pedro Salgado                                                    
                                                                                       
                                 
                      <[EMAIL PROTECTED]        To:       Struts Users Mailing List 
<[EMAIL PROTECTED]>                                                                    
                        
                      .com>                    cc:                                     
                                                                                       
                                 
                                               Subject:  Re: Dynamic form property 
names                                                                                  
                                     
                      30/12/2003 16:39                                                 
                                                                                       
                                 
                      Please respond to                                                
                                                                                       
                                 
                      "Struts Users                                                    
                                                                                       
                                 
                      Mailing List"                                                    
                                                                                       
                                 
                                                                                       
                                                                                       
                                 
                                                                                       
                                                                                       
                                 






  Sorry but I haven't quite catch what you looking for...
  Do you want to create a form in runtime? Is that it?

  If you're using a DynaForm it already has map. You can't set new
properties to the form (it was built based on a DynaClass) but, if you
extend DynaForm to a XDynaForm and make XDynaForm implement Map maybe you
can set new properties on your new form. I used this approach (the
DynaBean/Map extension) to start using DynaBeans with JSTL and, maybe...
just maybe it can help you set new properties on your form. I can send you
the class, if you want.

  As I said, I haven't tried this (the runtime form approach) and I don't
know if this is what you are looking for...

Pedro Salgado


On 30/12/2003 13:34, "Paul-J Woodward" <[EMAIL PROTECTED]> wrote:

>
> Anyone got any ideas?
>
> Thanks, Paul
>
>
>
>
>                     "Paul-J Woodward"
>                     <paul-j.woodward+exter        To:       Struts Users
> Mailing List <[EMAIL PROTECTED]>
>                     [EMAIL PROTECTED]>                   cc:
>                                                   Subject:  Dynamic form
> property names
>                     29/12/2003 19:55
>                     Please respond to
>                     "Struts Users Mailing
>                     List"
>
>
>
>
>
>
> 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]
>
>
>
>
>
> --
>
> 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--

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]

Reply via email to