Thanks for the help.  I tried these but I still couldn't come up with the right stuff. 
 Would you happen to have an example of the bean?  My original example was just going 
to pull it from an array that was on the same page.  Sorry if my questions seem 
elementary.  I am relatively new to both Java and struts.  Thanks.

-----Original Message-----
From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:45 PM
To: 'Struts Users Mailing List'
Subject: RE: New Struts User - Pick list help

This is code that I use and it works. See if it fits your requirements.
Lookup is a Java bean that has a method getBranchList() which returns a
collection of branches.

<jsp:useBean id="Lookup" class="com.xyz.LookUp" scope="application"/>
<bean:define id="branches" name="Lookup" property="branchList"
type="java.util.Collection"/>  
 <html:select property="branches">
        <html:options collection="branches" property="value"
labelProperty="description"/>
        </html:select>


-JC
-----Original Message-----
From: Honman Lee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 3:39 PM
To: Struts Users Mailing List
Subject: RE: New Struts User - Pick list help


Thanks JC.  I tried it but it doesn't seem to work. 
I am assuming I am using options because it is a dynamic list that needs to
be pushed into the picklist.  I have tried to use a combination of property
and name, only property and only name but nothing seems to work.  Maybe I am
missing something?  Could anyone point it out please?  Thanks.

-----Original Message-----
From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:25 PM
To: 'Struts Users Mailing List'
Subject: RE: New Struts User - Pick list help

Try
 <form:options name="list"/>
I am not sure if that is right.

But you can go here for further documentation.
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options

Hope that helps
-JC

-----Original Message-----
From: Honman Lee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 3:20 PM
To: Struts Users Mailing List
Subject: RE: New Struts User - Pick list help


Thanks Mark...Hopefully people can read this.

Can anyone help me with what I am doing wrong?
The following is part of a form where I am trying to get a dynamic picklist
generated:

<%
java.util.ArrayList list = new java.util.ArrayList();
  list.add("First");
  list.add("Second");
  list.add("Third");
  list.add("Fourth");
  list.add("Fifth");
  pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE);
%>                                    

 <form:select property="place">
 <form:options property="list"/>
 </form:select>

Any help would be greatly appreciated...
The error message I get is:
javax.servlet.jsp.JspException: Must specify type attribute if name is
specified
void org.apache.struts.taglib.html.FormTag.lookup()
int org.apache.struts.taglib.html.FormTag.doStartTag()
void
_body._provider__statement._providerStatementAdd._jspService(javax.servlet.h
ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse)
[/body/provider_statement/providerStatementAdd.jsp]
void com.orionserver[Oracle9iAS (2.0.0.0) Containers for
J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void oracle.jsp.runtimev2.JspPageTable.compileAndServe(oracle.jsp.runtimev2.
JspPageInfo, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequ
est, javax.servlet.http.HttpServletResponse, java.lang.String)
void
oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServl
etRequest, javax.servlet.http.HttpServletResponse)
void
oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletReques
t, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void com.evermind[Oracle9iAS (2.0.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletReque
st, javax.servlet.ServletResponse)
void com.evermind[Oracle9iAS (2.0.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequ
est, javax.servlet.ServletResponse)
void com.evermind[Oracle9iAS (2.0.0.0) Containers for
J2EE].server.http.EvermindPageContext.include(java.lang.String)
int s1.struts.taglib.component.InsertTag$InsertHandler.doEndTag()
int s1.struts.taglib.component.InsertTag.doEndTag()
void
_template._mainLayout._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
[/template/mainLayout.jsp]


-----Original Message-----
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:14 PM
To: 'Struts Users Mailing List'
Subject: RE: New Struts User - Pick list help

You are posting in MS PGothic 10-point font and it is difficult to read (and
anyone having HTML turned on will reply in the same font).  Change to Arial,
Helvetica, or other standard web font.

Mark

-----Original Message-----
From: Honman Lee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 4:02 PM

I am not sure I understand what you mean by "change your font".

-----Original Message-----
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 11:11 AM
To: 'Struts Users Mailing List'
Subject: RE: New Struts User - Pick list help

Yeah, change your font.

Mark

-----Original Message-----
From: Honman Lee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:59 PM

Can anyone help me with what I am doing wrong?

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to