Hi Jay,

this will add only text which will be displyed in drop down box. how do I set values 
for it?
i ve hash table from which i want to keep keys as values and hashtable values as 
displyed text in drop down box.

Sandeep

On Sat, 25 Aug 2001 Jay Patel wrote :
>From the subscription.jsp of the struts-example:
>
><%-- In real life, these would be loaded from a 
>database --%>
><%
>  java.util.ArrayList list = new java.util.ArrayList();
>  list.add(new org.apache.struts.webapp.example.LabelVal-
>ueBean("IMAP
>Protocol", "imap"));
>  list.add(new org.apache.struts.webapp.example.LabelVal-
>ueBean("POP3
>Protocol", "pop3"));
>  pageContext.setAttribute("serverTypes", list);
>%>
>
><html:select property="type">
>  <html:options collection="serverTypes" 
>property="value"
>labelProperty="label"/>
></html:select>
>
>Iteration is done by the tag, so don't worry. Each 
>element of the collection
>will be looked up, from each object in the collection, 
>two properties will
>be looked up; namely value and label ( in above example 
>). You may have
>different properties that you may want to look-up.
>
>
>Previous example I sent you *was* a real code I am 
>using.
>
>Jay Patel
>972-701-9773
>972-849-0373 Mobile
>[EMAIL PROTECTED]
> 
>
>
>-----Original Message-----
>From: s k m [mailto:[EMAIL PROTECTED]] 
>Sent: Friday, August 24, 2001 2:24 PM
>To: [EMAIL PROTECTED]
>Subject: Re: RE: Most Urgent - html:select tag
>
>
>Hi jay...
>Thank you for your urgent reply.
>i'm trying out , but confused.
>will u please, send one example?
>
>sandeep
>
>On Sat, 25 Aug 2001 Jay Patel wrote :
>>Short answer:
>>
>>              <html:select property="designId">
>>                <html:options collection="designs"
>>property="id"
>>labelProperty="name"/>
>>              </html:select>
>>
>>Long answer can be found at http://jakarta.apache.org
>>
>>Jay Patel
>>972-701-9773
>>972-849-0373 Mobile
>>[EMAIL PROTECTED]
>> 
>>
>>
>>-----Original Message-----
>>From: s k m [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, August 24, 2001 2:10 PM
>>To: [EMAIL PROTECTED]
>>Subject: Most Urgent - html:select tag
>>
>>
>>Hi all...
>>Please, inform me how to implement html:select tag?
>>I'm stuck up there.
>>Please, help.
>>
>>Sandeep
>>
>> 
>>
>>
>
>
> 
>
>


 



Reply via email to