Results 1 to 4 of 4

Thread: checkbox

  1. #1
    Alan is offline Member
    Join Date
    May 2007
    Posts
    39
    Rep Power
    0

    Default checkbox

    I need to repeat this:

    Java Code:
     
    <logic:present name="_list"> 
    
    <logic:iterate id="_list" name="_lista" indexId="i">
    
                                        <tr class="text">
    
                                            <td><bean:write name="_list" property="article"/></td>
    
                                            <td><bean:write name="_list" property="user.user"/></td>
    
                                            <td><bean:write name="_list" property="title"/></td>
    
                                            <td align="center"><img src="../img/vi.gif" alt='Observation: <bean:write name="_list" property="observation"/>'></td>
    
                                            <td><html:checkbox  property="chkNotify" /></td>
    
    
                                        </tr>
    
               </logic:iterate>        
    
    </logic:present>
    In the last line ( <td><html:checkbox property="chkNotify" /></td>) I have the problem, I need to index this property, but I dont know who gives me this index, how can I write it,etc


    Regards
    Alan
    Last edited by Alan; 06-01-2007 at 01:51 AM.

  2. #2
    pegitha is offline Member
    Join Date
    Apr 2007
    Location
    Indiana
    Posts
    83
    Rep Power
    0

    Default

    I like to use the nested tag in these instances.
    here is an instance of some code I wrote using the multibox.
    Java Code:
    <logic:iterate id="category" property="progDisplayItems" name="allMenuForm">               
       <li>
         <nested:multibox name="allMenuForm" property="displayItemsChosen">
           <nested:write name="category" property="id" />                   
          </nested:multibox>
          <bean:write name="category" property="description" filter="false"/>        
    </logic:iterate>

  3. #3
    Freddie is offline Member
    Join Date
    May 2007
    Posts
    41
    Rep Power
    0

    Default

    Hey I did something like this, but I did not use checkbox, I used multibox, is more simpler than this.
    here is the link
    Dynamic checkboxes with Struts
    Last edited by Freddie; 06-01-2007 at 02:44 PM.

  4. #4
    ajava is offline Member
    Join Date
    May 2007
    Posts
    1
    Rep Power
    0

    Default

    Hi Freddie,

    Dynamic checkboxes with Struts
    I think this article shows the creation of pre-checked checkboxes
    using html:multibox tag.

    Also this example assumes a hard coded array. Do you have any idea how this can be done if the values are dynamic?

    Regards
    ajava
    Last edited by levent; 05-18-2007 at 10:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •