• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multibox Not Populating as Checked!!!

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Has anybody got any idea about multibox, how to make it checked while displaying.
1) this is my iterate logic
=================================================
<table>
<tr>
<logic:iterate id="Org" name="hmTemp">
<td>
<html:multibox property = "hmOrg">
<bean:write name="Org" property="key"/>
</html:multibox>
<bean:write name="Org" property="value"/>
</td>
</TR>
</logic:iterate>
</table>
=================================================
i have an ActionForm which has getter & setter method as follows: for "hmOrg"
=================================================
public HashMap getHmOrg() {
return this.hmOrg;
}
public void setHmOrg(HashMap values) {
this.hmOrg = values;
}
=================================================
am calling hmOrg and setting the values in the bean, but its not populating for the selected checkboxes.

Thanks in Advance
suv
 
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
You need to prepopulate your action form in one action before handing it to another action for rendering in the browser.
For instance, assume you are create an 'Edit <xxx>' tool of some kind and some of the information to be modified contains populated checkboxes. In order to execute this command, you have to do something like the following:
1. Execute the 'prepopulateEditXXXForm' Action class.
2. Execute the 'editXXX' Action class.
3. Execute the 'processEditXXXForm' Action class.
These actions, if executed in order would: (i) populate the edit form with data before it is displayed on the screen; (ii) render the pre-populated form on the screen; and (iii) process the results of the editing.
If Step 1 is missed, then the action form's values will be reset to their default values before the form is displayed. It sounds as though this is what's happening in your example.
Cheers,
Darryl
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic