• 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

simple multibox problem - am I going mad?

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a bean -

public class ResourceType_DTO
{
long resTypeID;
String resName;

public String getResName()
{
return resName;
}
public void setResName(String resName)
{
this.resName = resName;
}
public long getResTypeID()
{
return resTypeID;
}
public void setResTypeID(long resTypeID)
{
this.resTypeID = resTypeID;
}
}

I set a List of these objects on the request object like so -

request.setAttribute("resTypesList", getResourceTypeList());

I then want to display a checkbox for each ResourceType_DTO object in the list. So the value attribute for each checkbox would be "resTypeID" & the text displayed "resName".

I've tried every combination of <html:multibox> & <logic:iterate> tags I can think of but still can't get this simple task to happen!

Any help please, this is doing my Head in!
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this would work.

<logic:iterate id="name" name="resTypeList">
<html:multibox name="Give Action Form Name to get this value further"
property ="Name Of The Field In that Form Here" ><bean:write name="name" property="resTypeId"/></html:multibox><bean:write name="name" property="resName"/>
</logic:iterate>
 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cheers Amit, works fine now!
 
reply
    Bookmark Topic Watch Topic
  • New Topic