Corey's suggestion could work with arraylist. 

If you use your code

<html:select collection="Logs" .. 

Then the arrayList needs to be cast to an array. 

request.setAttribute("Logs",myList.toArray());

Mark


On Wed, 1 Dec 2004 20:10:16 +0800, Corey Scott <[EMAIL PROTECTED]> wrote:
> Andy,
> 
> I believe you are after something like this:
> <html:select property="logName">
>     <html:optionsCollection name="Logs" label="logName" value="logId" />
> </html:select>
> 
> Regards,
> Corey
> 
> 
> 
> On Wed, 01 Dec 2004 11:18:33 +0000, andy wix <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to use  select and options tags in the simplest way where I have
> > an ArrayList of Strings in the request (Logs) and I wish the one selected to
> > end up in the form's logName variable.
> > According to page 296 of Struts in action I think this should work:
> >
> > <html:select property="logName">
> >  <html:options collection="Logs" />
> > </html:select>
> >
> > but I get:
> >
> > [ServletException in:/selectLog.jsp] No name specified'
> > java.lang.IllegalArgumentException: No name specified at
> > org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:721)
> > at
> > org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
> > at
> >
> > etc
> >
> > Thanks,
> > Andy
> >
> > _________________________________________________________________
> > It's fast, it's easy and it's free. Get MSN Messenger today!
> > http://www.msn.co.uk/messenger
> >
> > ---------------------------------------------------------------------
> > 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]

Reply via email to