struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Patel <jpa...@dexteragroup.com>
Subject RE: RE: Most Urgent - html:select tag
Date Fri, 24 Aug 2001 19:27:34 GMT
>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.LabelValueBean("IMAP
Protocol", "imap"));
  list.add(new org.apache.struts.webapp.example.LabelValueBean("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
jpatel@dexteragroup.com
 


-----Original Message-----
From: s k m [mailto:strut@rediffmail.com] 
Sent: Friday, August 24, 2001 2:24 PM
To: struts-user@jakarta.apache.org
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
>jpatel@dexteragroup.com
> 
>
>
>-----Original Message-----
>From: s k m [mailto:strut@rediffmail.com]
>Sent: Friday, August 24, 2001 2:10 PM
>To: struts-user@jakarta.apache.org
>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
>
> 
>
>


 



Mime
View raw message