Hi All, Thanks for the replies. The my form bean is like this. Should I have another set of setter and getter methods which stores the values of selected records??.
================= FORM BEAN CODE ==================== package com.test.actions; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import javax.servlet.http.HttpServletRequest; public class BusinessObjectDetailsForm extends ActionForm { private String[] objectId = null; public String[] getObjectId() { return objectId; } public void setObjectId(String[] selectedObjects) { this.objectId = selectedObjects; } public void reset(ActionMapping mapping, HttpServletRequest request) { selectedObjects = null; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (this.objectId == null || this.objectId.length <= 0) { errors.add("SelectRecord", new ActionError("error.select.norecord")); } return errors; } } ====================== END OF FORM BEAN CODE ========================= ======================= JSP CODE ========================================= <table> <logic:iterate id="businessObject" indexId="idx" name="BusinessObjectsList" type="com.test.beans.BusinessObjectBean"> <TR> <td align="center"><%=(idx).intValue()+1%></td> <td align="center"> <bean:write name="businessObject" property="name"/> </td> <td align="center"> <bean:write name="businessObject" property="type"/> </td> <td align="center"> <bean:write name="businessObject" property="revision"/> </td> <td align="center"> <bean:write name="businessObject" property="status"/> </td> <td align="center"> <bean:write name="businessObject" property="owner"/> </td> <td align="center"> <html:multibox name="businessObject" property="objectId" > <bean:write name="businessObject" property="objectId"/> </html:multibox> </td> </TR> <TR><TD colspan=7> </TD></TR> </logic:iterate> </table> ================== END OF JSP CODE ====================================== > ATTACHMENT part 15 message/rfc822 > Date: Mon, 28 Jul 2003 04:10:15 -0700 (PDT) > From: "Nagaraj G.K" <[EMAIL PROTECTED]> > Subject: Re: Re: Multiboxes getting selected by default > To: Struts Users Mailing List <[EMAIL PROTECTED]> > > what is the collection and method name used in your form bean to hold > the values of the multibox ?? > > pradeep bhargav <[EMAIL PROTECTED]> wrote:Hi, > > This is how I'm generating the list of records, in this my main list is > BusinessObjectsList which is a collection if BusinessObjectBean classes. > This is the only collection I'm using. Should I be using another > collection/array, if yes where should I have the setter and getter > methods > for them and what should they contain. > > Please help me in resolving this issue. > > ======================= CODE ========================================= > > name="BusinessObjectsList" type="com.test.beans.BusinessObjectBean"> ===== pradeepbhargav JCE CIVIL GROUP MatrixOne India Scandent Group [EMAIL PROTECTED] __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]