Nuwan, Yes, with out <option> I con't go further in this. This did not serve the purpose.
'<%=dataFrom+"Bean.prdIdsList"%>' is String array with ids in it. IConstants.SESSION_ATTR_SCR_PRODUCTS%> has bean collection (bean has id and value). If the id matches in both I want to print the value of it in the plain text format on the page. Using select/options will not help here. Regards -----Original Message----- From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] Sent: Saturday, January 20, 2007 4:53 PM To: Nuwan Chandrasoma; Struts Users Mailing List Subject: Re: nested:select to logic:iterate or nested:iterate Omg.. what i am writeing here.., your are correct.. how could this code have displayed a option values for the select box. where is the <options> tag.. , its missing... try this and see <nested:select property='<%=dataFrom+"Bean.prdIdsList"%>' multiple="true" size="3" styleId='<%=dataFrom+"prdIds"+(index)%>' styleClass="textField" > <logic:iterate name="<%=IConstants.SESSION_ATTR_SCR_PRODUCTS%>" id="product"> <option><bean:write name="product"/></option> </logic:iterate> </nested:select> Thanks, Nuwan ----- Original Message ----- From: "Nuwan Chandrasoma" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Saturday, January 20, 2007 9:47 PM Subject: Re: nested:select to logic:iterate or nested:iterate > Hi, > > According to the code sample you have given below. i dont think the > ArrayList you are iterating contains strings. it must be having some bean > collction. > in that bean there should be 2 attributes called id and value. > > so find the bean type that is in this ArrayList and then iterate those and > see.. for eg:- > > <nested:select property='<%=dataFrom+"Bean.prdIdsList"%>' > multiple="true" size="3" styleId='<%=dataFrom+"prdIds"+(index)%>' > styleClass="textField" > > > <logic:iterate name="<%=IConstants.SESSION_ATTR_SCR_PRODUCTS%>" > id="product" type="<the class name of the bean that is in this list>"> > <bean:write name="product" property="value"/> > </logic:iterate> > > </nested:select> > > Thanks, > > Nuwan > > > > ----- Original Message ----- > From: "Bhanu Valasa" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <user@struts.apache.org> > Sent: Saturday, January 20, 2007 4:02 PM > Subject: RE: nested:select to logic:iterate or nested:iterate > > > Nuwan, > > Infact I tried this....but did not help. > I could see a small select box, nothing is displayed in it. I Guess it > expects only options to be provided inside <nested:select > Even after providing the value for <bean:write it's the same.... > > Regards > > > -----Original Message----- > From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 20, 2007 3:29 AM > To: Struts Users Mailing List > Subject: Re: nested:select to logic:iterate or nested:iterate > > <nested:select property='<%=dataFrom+"Bean.prdIdsList"%>' > multiple="true" size="3" styleId='<%=dataFrom+"prdIds"+(index)%>' > styleClass="textField" > > > <logic:iterate name="<%=IConstants.SESSION_ATTR_SCR_PRODUCTS%>" > id="product"> > <bean:write name="product"/> > </logic:iterate> > > </nested:select> > > > Thanks, > > Nuwan > > ----- Original Message ----- > From: "Bhanu Valasa" <[EMAIL PROTECTED]> > To: <user@struts.apache.org> > Sent: Friday, January 19, 2007 7:20 PM > Subject: nested:select to logic:iterate or nested:iterate > > > Hello gurus.... > > > > I have struts tag in my jsp, which displays HTML select option box with > selected (a String array in the bean) > > > > <nested:select property='<%=dataFrom+"Bean.prdIdsList"%>' > multiple="true" size="3" styleId='<%=dataFrom+"prdIds"+(index)%>' > styleClass="textField" > > > <html:options collection="<%=IConstants.SESSION_ATTR_SCR_PRODUCTS%>" > property="id" labelProperty="value"/> > > </nested:select> > > > > Instead HTML Select box I want to print the String array elements in > text format. > > > > Could some one please help me how to use logic:iterate or nested:iterate > > > > Please suggest.... > > > > thanks > > > > > > --------------------------------------------------------------------- > 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] > --------------------------------------------------------------------- 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]