Hi I eventually ended up using the logic:iterate tag and it worked ,thx
For anyone who faced similar error ,my code was <html:select property="availableList" size="18" multiple="true"> <logic:iterate id="categoryAvailableList" name="availableFieldList"> <option value=<bean:write name="categoryAvailableList" property="lookupType" />><bean:write name="categoryAvailableList" property="lookupTypeLabel" /> </option> <logic:present name="categoryAvailableList" property="admStuLookupMasterVO"> <logic:iterate id="subcategoryAvailableList" name="categoryAvailableList" property = "admStuLookupMasterVO"> <option value=<bean:write name="subcategoryAvailableList" property="lookupType" />|<bean:write name="subcategoryAvailableList" property="lookupCode" />>...<bean:write name="subcategoryAvailableList" property="lookupDesc" /> </option> </logic:iterate> </logic:present> </logic:iterate> </html:select> thxx everybody Mandeep -----Original Message----- From: Michael D. Norman [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2003 10:04 AM To: 'Struts Users Mailing List' Subject: RE: <HTML:SELECT> giving headaches You could do this a couple of ways (thinking out loud here): 1) Do some preprocessing and build a list of all the objects, but I guess that would only work if your SubCategory class had the same properties for name and ID. 2) Do some preprocessing and add ID/name pairs to a SequenceHashMap (org.apache.commons.collections.SequencedHashMap) and use that as your collection. 3) Don't use <html:options/> but instead use nested <logic:iterate/> tags (for each category, loop over the subcategories in the collection) and use <html:option/> tags with name/value pairs. This is probably the best since it is the clearest as to what you are doing, plus you can create the empty spaces more easily. -- Michael D. Norman ProbuSoft -- Custom Software Development http://www.probusoft.com/ 913-390-6951 [EMAIL PROTECTED] > -----Original Message----- > From: Sethi, Mandeep [mailto:[EMAIL PROTECTED] > Sent: Friday, October 17, 2003 9:39 AM > To: 'Struts Users Mailing List' > Subject: <HTML:SELECT> giving headaches > > > > Hi Everyone > > I'm working on displaying a collection using <HTML:SELECT>. > I'm our case we have a collection of value objects in session scope ,so > for > e.g > in our case we have a collection of Category in session scope ,Which > further > has > a collection of subCategory and I need to display them in a select list in > way like > > Category name1 > ...subCategory name1 > ...subCategory name2 > > Category name2 > ...subCategory name1 > ...subCategory name2 > > > class Category() > { > String name; > String id; > Collection subCategory; > > } > > Class SubCategory{ > String subName; > String subID; > } > > So far I'm successfull with first part that is displaying Category name > with > their id as value ,my code is > > <html:select property="availableList" size="18" multiple="true"> > <html:options collection="availableFieldList" > property="lookupType" > labelProperty="lookupTypeLabel"/> > </html:select> > > > where availableFieldList is the collection of Category , > > Can anyone suggest few ideas for my second step of displaying > subcategories > too in required fashion, > > Thank You > > > ************************************************************************ ** > ** > This email may contain confidential material. > If you were not an intended recipient, > Please notify the sender and delete all copies. > We may monitor email to and from our network. > ************************************************************************ ** > ** > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. **************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]