struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhil walvekar <walvekarnik...@yahoo.co.in>
Subject Re: <html:options .... >
Date Thu, 10 Jun 2004 05:43:26 GMT
Hi,
if your collection contains only options which are to be shown not blank option something
like this.
option[0]="option0";
option[1]="option1";
option[2]="option2";
 
Then always first option will be selected.
now if you want some another option to be selected then 
you have to provide value attribute for html:select tag
If you specify some another value which is not in that collection then it will select first
value in collection.
 
 
Nikhil

Shailender Jain <shailender.jain@teleatlas.com> wrote:
Hi All,

If the someBean.getDefault() has some values which is not there in the
collection SORT then the problem
is that the select tag will display some value from the collection not the
value from someBean.getDefault().

I faced this situation when i had to display a blank combo box and the
collection having the data of the employee names.


Any idea on how to handle this?



Shailender Jain

nikhil walvekar wrote:

> Hi,
>
> for html:select tag you can specify value
> there you can write your default value from some bean
>
> > onchange="document.forms[4].elements[2].focus()" value="">
> > labelProperty="label"/>
> 
>
> Nikhil.
>
> Caroline Jen wrote:
> I try to create a drop down menu as follow:
>
> > onchange="document.forms[4].elements[2].focus()">
> > labelProperty="label"/>
> 
>
> I am able to disply the menu.
>
> I want one of the options to be selected by default.
> Therefore, I want to type SELECTED somewhere. How do
> I do it?
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Nikhil
>
> Yahoo! India Matrimony: Find your partner online.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Yahoo! India Matrimony: Find your partner online.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message