Custom Search

[Top] [All Lists]

Populating Sets

Subject: Populating Sets
Date: Thu, 24 Nov 2005 10:39:35 +0100
I wonder what's the best (or "Stripes") way to do the following:
I have a domain model "Foo" which has a Set of "Bar"s. I want to show a form in the web front-end containing all availabe "Bar"s w/ checkboxes. The ones contained in "Foo" are (pre)selected. The user can add or remove "Bar"s by checking/unchecking the checkboxes.
So far, I can go (in the JSP) with something like
<c:forEach items="${actionBean.allBars}" var="b">
<li><stripes:checkbox name="???" value="${}" checked="${}" /> ${}</li>
But how can I (re)populate the set ( after submitting the form? The Struts-way would be a "Long[] barIds" (w/ checkboxes' name="barIds") and then fill Foo's set explicitly -- cumbersome and repetitive :(
Any ideas?
(Please CC me, I'm not subscribed to this list.)
Sebastian Beigel // Software Architekt
(F) Die Firma GmbH // Innovative Kommunikation
Schwalbacher Straße 74 // D-65183 Wiesbaden
T +49.6 11.2 38 50.24 // F +49.6 11.2 38 50.11
mailto:[email protected] //
This email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<Prev in Thread] Current Thread [Next in Thread>
  • Populating Sets,
    • Re: Populating Sets
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy