Re: select/options/option

2002-01-14 Thread Manuel Martin

Hello,

On Fri, 11 Jan 2002 15:48:31 -0800 
Jason Wells <[EMAIL PROTECTED]> wrote:
> Using the  tag, is there a way to set an option to be 
> initially selected? I'm looking for something equivalent to
> 
> blah
> 
> I don't see mention of this in the online docs for the HTML taglib.

This can be done by initializing the form-bean with the value you'd like
to be selected by default. Very nice indeed.

Bye, MM
-- 
http://www.martinnet.de


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: select/options/option

2002-01-14 Thread Larry Maturo

Hi Jason,

As a matter of fact, I was going to add that.  Now
I have reason to.  Thank you. :-)

-- Larry

Select can be used with:

a: A collection of strings, such as an arraylist
b: A collection of beans, each of which has string fields
c: Hard coded values

I know you can combine a and c, as well as b and c.  I'm
guessing you could combine a, b, and c as well.

With An ArrayList of Strings


ArrayList name is nameList.  This list has been put into 
either the request or session.

name of field in form bean to set is selectedValue.





How to Set a Selected Value
---
Modify select as follows:




where aName is one of the names in the arrayList.

With An ArrayList of Beans
--

Bean string fields of interest are:
  1.  displayValue
  2.  idValue

ArrayList name is beanList.  This list has been put into 
either the request or session.

name of field in form bean to set is selectedValue.  It
should be set to the idValue of the selected bean.





How to Set a Selected Value
---
Modify select as follows:



where aProperty is one of the strings in the field of the bean
specified by property in the options tag.

With HardCoded Values
-

name of field in form bean to set is selectedValue.


  



How to Set a Selected Value
---
Modify select as follows:


  

  

-Original Message-
From: Jason Wells [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 5:49 PM
To: Struts Users Mailing List
Subject: Re: select/options/option


Thanks for the summarized info.

Using the  tag, is there a way to set an option to be 
initially selected? I'm looking for something equivalent to

blah

I don't see mention of this in the online docs for the HTML taglib.

Thanks,
Jason


Larry Maturo wrote:

> Since I see these questions come up, and I just got them
> figured out, I thought I would share them with the mailing
> list.
> 
> Select can be used with:
> 
> a: A collection of strings, such as an arraylist
> b: A collection of beans, each of which has string fields
> c: Hard coded values
> 
> I know you can combine a and c, as well as b and c.  I'm
> guessing you could combine a, b, and c as well.
> 
> With An ArrayList of Strings
> 
> 
> ArrayList name is nameList.  This list has been put into 
> either the request or session.
> 
> name of field in form bean to set is selectedValue.
> 
> 
>   
> 
> 
> With An ArrayList of Beans
> --
> 
> Bean string fields of interest are:
>   1.  displayValue
>   2.  idValue
> 
> ArrayList name is beanList.  This list has been put into 
> either the request or session.
> 
> name of field in form bean to set is selectedValue.  It
> should be set to the idValue of the selected bean.
> 
> 
>  
> labelProperty="displayValue"/>
> 
> 
> With HardCoded Values
> -
> 
> name of field in form bean to set is selectedValue.
> 
>   
> 
>   
> 
> 
> -- Larry Maturo
>[EMAIL PROTECTED]
>Athens Group, Inc.

-- 
Jason Wells
Web Architect
Xsilogy, Inc.
http://www.xsilogy.com/


--
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]>




Re: select/options/option

2002-01-12 Thread Arron

The value which is returned from the "property" property in the select 
tag will make the choice for you if one of the choices matches this value.

eg.
Use the options tag running off a list, and if the property which is 
specified in the select tag matches one, Struts will select it for you.


Arron.

Jason Wells wrote:

> Thanks for the summarized info.
>
> Using the  tag, is there a way to set an option to be 
> initially selected? I'm looking for something equivalent to
>
> blah
>
> I don't see mention of this in the online docs for the HTML taglib.
>
> Thanks,
> Jason
>
>
> Larry Maturo wrote:
>
>> Since I see these questions come up, and I just got them
>> figured out, I thought I would share them with the mailing
>> list.
>>
>> Select can be used with:
>>
>> a: A collection of strings, such as an arraylist
>> b: A collection of beans, each of which has string fields
>> c: Hard coded values
>>
>> I know you can combine a and c, as well as b and c.  I'm
>> guessing you could combine a, b, and c as well.
>>
>> With An ArrayList of Strings
>> 
>>
>> ArrayList name is nameList.  This list has been put into either the 
>> request or session.
>>
>> name of field in form bean to set is selectedValue.
>>
>> 
>> 
>> 
>>
>> With An ArrayList of Beans
>> --
>>
>> Bean string fields of interest are:
>>   1.  displayValue
>>   2.  idValue
>>
>> ArrayList name is beanList.  This list has been put into either the 
>> request or session.
>>
>> name of field in form bean to set is selectedValue.  It
>> should be set to the idValue of the selected bean.
>>
>> 
>> > labelProperty="displayValue"/>
>> 
>>
>> With HardCoded Values
>> -
>>
>> name of field in form bean to set is selectedValue.
>> 
>> 
>>
>> 
>> 
>>
>> -- Larry Maturo
>>[EMAIL PROTECTED]
>>Athens Group, Inc.
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: select/options/option

2002-01-11 Thread Jason Wells

Thanks for the summarized info.

Using the  tag, is there a way to set an option to be 
initially selected? I'm looking for something equivalent to

blah

I don't see mention of this in the online docs for the HTML taglib.

Thanks,
Jason


Larry Maturo wrote:

> Since I see these questions come up, and I just got them
> figured out, I thought I would share them with the mailing
> list.
> 
> Select can be used with:
> 
> a: A collection of strings, such as an arraylist
> b: A collection of beans, each of which has string fields
> c: Hard coded values
> 
> I know you can combine a and c, as well as b and c.  I'm
> guessing you could combine a, b, and c as well.
> 
> With An ArrayList of Strings
> 
> 
> ArrayList name is nameList.  This list has been put into 
> either the request or session.
> 
> name of field in form bean to set is selectedValue.
> 
> 
>   
> 
> 
> With An ArrayList of Beans
> --
> 
> Bean string fields of interest are:
>   1.  displayValue
>   2.  idValue
> 
> ArrayList name is beanList.  This list has been put into 
> either the request or session.
> 
> name of field in form bean to set is selectedValue.  It
> should be set to the idValue of the selected bean.
> 
> 
>  
> labelProperty="displayValue"/>
> 
> 
> With HardCoded Values
> -
> 
> name of field in form bean to set is selectedValue.
> 
>   
> 
>   
> 
> 
> -- Larry Maturo
>[EMAIL PROTECTED]
>Athens Group, Inc.

-- 
Jason Wells
Web Architect
Xsilogy, Inc.
http://www.xsilogy.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




select/options/option

2002-01-10 Thread Larry Maturo

Since I see these questions come up, and I just got them
figured out, I thought I would share them with the mailing
list.

Select can be used with:

a: A collection of strings, such as an arraylist
b: A collection of beans, each of which has string fields
c: Hard coded values

I know you can combine a and c, as well as b and c.  I'm
guessing you could combine a, b, and c as well.

With An ArrayList of Strings


ArrayList name is nameList.  This list has been put into 
either the request or session.

name of field in form bean to set is selectedValue.





With An ArrayList of Beans
--

Bean string fields of interest are:
  1.  displayValue
  2.  idValue

ArrayList name is beanList.  This list has been put into 
either the request or session.

name of field in form bean to set is selectedValue.  It
should be set to the idValue of the selected bean.





With HardCoded Values
-

name of field in form bean to set is selectedValue.


  



-- Larry Maturo
   [EMAIL PROTECTED]
   Athens Group, Inc.



winmail.dat
Description: application/ms-tnef

--
To unsubscribe, e-mail:   
For additional commands, e-mail: