You can use an <html:option> tag as well:

   <html:select property="productId">
        <html:option value="0">select</html:option>
        <html:optionsCollection name="...." label="...." value="productId"/>
   </html:select>

Niall

----- Original Message ----- 
From: "andy wix" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 23, 2004 2:19 PM
Subject: <html:options> best practice


> Hi,
>
> I am wondering if there is a neat way to overcome a typical problem when
> offering a drop-down menu to a user.  It is common to have a default
option
> called say 'select'.  The drop down objects in my case are an arraylist
> which are the result of a trip to the db.
>
> So far, my contrived solution is to have a dummy object which I add at
> position zero in the arraylist which has a name field of 'select', but
this
> is nasty as there are times I want to use the arraylist (stored in the
> sesion) without this item and it means shipping a db with a 'must-have'
> record.
>
> Thanks,
> Andy



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

Reply via email to