RE: select, options, define???

2002-12-24 Thread VEDRE, RANAPRATAP REDDY
you can create a collection for the rights and store it in application
context when your application starts(may be in an initialization servlet).

then use the  tag and  tag to render the admin
picklist(s).

you can use ten  tags for login fields or look into the
possibility of using an array for login fields.

-rana.





-Original Message-
From: Jitendra Singh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 24, 2002 7:25 AM
To: [EMAIL PROTECTED]
Subject: select, options, define???


I am still fighting .. help help!!

I have a form with 10 login id displayed as text field and ther admin rights
chosen from a drop down lists .. all drop down lists are same.

looks like this ..

Login Id1   AdminRight1
Login Id2AdminRight2
Login Id3AdminRight2
.
.
.
Login IdnAdminRight1

How do i do it ???

any help, suggestion, advice hint .. all welcome .. 

thanks in advance ...
Jitendra 

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




Re: Select Options

2002-09-09 Thread Craig Tataryn

Hi Johnathan, I think you are getting confused with how it actually selects
the value that the user intended.

Think of it this way:


  


This means that when the form is submitted, the "type" parameter is sent to
your action class with the "value" that they selected from the options.
Because this is struts, if your FormBean happens to have a
"getType()/setType()" method on it, that property will be set at form
submission, and subsequently the  tag will "get" the value of
that property and make sure that the corresponding option is selected in in
the list.

The options tag is simple, you set the collection attribute to a collection
of objects which possess a "getValue()" and a "getLabel()" method, the
values of these methods are used in the resulting  tag for the
"value" attribute and the text that goes between the  tags
respectively..

Make sense?

Craig.

- Original Message -
From: "Smith, Johnathan M." <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 1:01 PM
Subject: RE: Select Options


> Can you please help me some more with details
>
> -Original Message-
> From: Carl Bacher [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 12:59 PM
> To: Struts Users Mailing List
> Subject: Re: Select Options
>
>
> 
>
> Smith, Johnathan M. wrote:
>
> >I am trying to find out how to make a select (dropdown list) selected a
> >option at the time of the page is loaded.  Sample
> >
> >1) I selected a option from my dropdown box and and click submit button
> >2) The FormAction find that I did not entered all the requested text boxs
> >and it redisplays the page
> >
> >at this time I would like the option I selected to be reselected!
> >
>
> --
> 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

2002-09-09 Thread Michael Lee

A good example is in the struts-exersize-tablib.war in the struts/webapps
dir
look at html-select.jsp
You can create a collection of OptionBeans and select it or explicitly set
each option. There are examples of both in this jsp.
Mike

- Original Message -
From: "Smith, Johnathan M." <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 1:01 PM
Subject: RE: Select Options


> Can you please help me some more with details
>
> -Original Message-
> From: Carl Bacher [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 12:59 PM
> To: Struts Users Mailing List
> Subject: Re: Select Options
>
>
> 
>
> Smith, Johnathan M. wrote:
>
> >I am trying to find out how to make a select (dropdown list) selected a
> >option at the time of the page is loaded.  Sample
> >
> >1) I selected a option from my dropdown box and and click submit button
> >2) The FormAction find that I did not entered all the requested text boxs
> >and it redisplays the page
> >
> >at this time I would like the option I selected to be reselected!
> >
>
> --
> 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

2002-09-09 Thread Karr, David

> -Original Message-
> From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 10:01 AM
> To: 'Struts Users Mailing List'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: Select Options
> 
> Can you please help me some more with details

It would be hard to help with "details" without any more questions.  It
sounds like you're getting lost on a somewhat high level.  I would suggest
you read the Struts documentation thoroughly.  In addition, you could look
at the JSP pages for the "struts-exercise-taglib".  The page
"html-select.jsp" demonstrates a simple example of usage of the
"html:select" tag.

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




RE: Select Options

2002-09-09 Thread Smith, Johnathan M.

Can you please help me some more with details

-Original Message-
From: Carl Bacher [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 12:59 PM
To: Struts Users Mailing List
Subject: Re: Select Options




Smith, Johnathan M. wrote:

>I am trying to find out how to make a select (dropdown list) selected a
>option at the time of the page is loaded.  Sample
>
>1) I selected a option from my dropdown box and and click submit button
>2) The FormAction find that I did not entered all the requested text boxs
>and it redisplays the page
>
>at this time I would like the option I selected to be reselected!
>

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




Re: Select Options

2002-09-09 Thread Carl Bacher



Smith, Johnathan M. wrote:

>I am trying to find out how to make a select (dropdown list) selected a
>option at the time of the page is loaded.  Sample
>
>1) I selected a option from my dropdown box and and click submit button
>2) The FormAction find that I did not entered all the requested text boxs
>and it redisplays the page
>
>at this time I would like the option I selected to be reselected!
>
>Johnathan Mark Smith
>Divisional Assistant Vice President
>Information Systems Division
>
>Phone: (201) 352-1387
>Pager: (201) 718-1370
>Email: [EMAIL PROTECTED]
>Text Messaging: [EMAIL PROTECTED]
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



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




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: 




RE: select options doesn't work

2001-06-15 Thread Krueger, Jeff

In your Form bean change your set method to take a string.

   public void setMarketList(String marketList)
   {
   }

You will only get the item the user selected back in your bean, not the
whole list.



-Original Message-
From: Kiet Nguyen
To: '[EMAIL PROTECTED]'
Sent: 6/15/2001 11:10 AM
Subject: RE: select options doesn't work

look at the subscription.jsp in the strutsexample.  

-Original Message-
From: Pal, Gaurav [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 7:18 AM
To: '[EMAIL PROTECTED]'
Subject: select options doesn't work


Hi,
I have been trying to get the select options tag to work in the html tag
library. I tried to follow the sample code given in the struts-mailing
list.
I keep getting jsp exceptions at
org.apache.struts.taglib.template.InsertTag.doEndTag ...

The code snippets are below...any help is appreciated.
Thanks,
Gaurav


   

   
  
   


Here is my bean with a Vector consisting of Option objects with value
and
description as the property.


public class MyForm extends ActionForm
{
   private Vector marketList;
   public void setMarketList(Vector marketList)
   {
  // SBgen: Assign variable
  this.marketList = marketList;
   }

   public Vector getMarketList()
   {
  // SBgen: Get variable
  return(marketList);
   }
}

class Option
{
   private String strValue;
   private String strDescription;
   
   public void setValue(String value)
   {
  strValue = value;
   }
   
   public String getValue()
   {
  return strValue;
   }
   
   public void setDescription(String description)
   {
  strDescription = description;
   }
   
   public String getDescription()
   {
  return strDescription;
   }
}   



RE: select options doesn't work

2001-06-15 Thread Kiet Nguyen

look at the subscription.jsp in the strutsexample.  

-Original Message-
From: Pal, Gaurav [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 7:18 AM
To: '[EMAIL PROTECTED]'
Subject: select options doesn't work


Hi,
I have been trying to get the select options tag to work in the html tag
library. I tried to follow the sample code given in the struts-mailing list.
I keep getting jsp exceptions at
org.apache.struts.taglib.template.InsertTag.doEndTag ...

The code snippets are below...any help is appreciated.
Thanks,
Gaurav


   

   
  
   


Here is my bean with a Vector consisting of Option objects with value and
description as the property.


public class MyForm extends ActionForm
{
   private Vector marketList;
   public void setMarketList(Vector marketList)
   {
  // SBgen: Assign variable
  this.marketList = marketList;
   }

   public Vector getMarketList()
   {
  // SBgen: Get variable
  return(marketList);
   }
}

class Option
{
   private String strValue;
   private String strDescription;
   
   public void setValue(String value)
   {
  strValue = value;
   }
   
   public String getValue()
   {
  return strValue;
   }
   
   public void setDescription(String description)
   {
  strDescription = description;
   }
   
   public String getDescription()
   {
  return strDescription;
   }
}   



RE: select options doesn't work

2001-06-15 Thread Pal, Gaurav

Thanks for your suggestion - but it still doesn't work...I keep getting the
same exception.

Gaurav

-Original Message-
From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 10:25 AM
To: [EMAIL PROTECTED]
Subject: Re: select options doesn't work


Hi!

Try to change your property for the option to a boolean!!

private String strValue;

private boolean value;

/Linnéa
- Original Message -
From: "Pal, Gaurav" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 4:18 PM
Subject: select options doesn't work


> Hi,
> I have been trying to get the select options tag to work in the html tag
> library. I tried to follow the sample code given in the struts-mailing
list.
> I keep getting jsp exceptions at
> org.apache.struts.taglib.template.InsertTag.doEndTag ...
>
> The code snippets are below...any help is appreciated.
> Thanks,
> Gaurav
>
> 
>  scope="request" />
>
>
>labelProperty="description" />
>
>
>
> Here is my bean with a Vector consisting of Option objects with value and
> description as the property.
>
>
> public class MyForm extends ActionForm
> {
>private Vector marketList;
>public void setMarketList(Vector marketList)
>{
>   // SBgen: Assign variable
>   this.marketList = marketList;
>}
>
>public Vector getMarketList()
>{
>   // SBgen: Get variable
>   return(marketList);
>}
> }
>
> class Option
> {
>private String strValue;
>private String strDescription;
>
>public void setValue(String value)
>{
>   strValue = value;
>}
>
>public String getValue()
>{
>   return strValue;
>}
>
>public void setDescription(String description)
>{
>   strDescription = description;
>}
>
>public String getDescription()
>{
>   return strDescription;
>}
> }
>



Re: select options doesn't work

2001-06-15 Thread Linnea Ahlbeck

Hi!

Try to change your property for the option to a boolean!!

private String strValue;

private boolean value;

/Linnéa
- Original Message -
From: "Pal, Gaurav" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 4:18 PM
Subject: select options doesn't work


> Hi,
> I have been trying to get the select options tag to work in the html tag
> library. I tried to follow the sample code given in the struts-mailing
list.
> I keep getting jsp exceptions at
> org.apache.struts.taglib.template.InsertTag.doEndTag ...
>
> The code snippets are below...any help is appreciated.
> Thanks,
> Gaurav
>
> 
>  scope="request" />
>
>
>labelProperty="description" />
>
>
>
> Here is my bean with a Vector consisting of Option objects with value and
> description as the property.
>
>
> public class MyForm extends ActionForm
> {
>private Vector marketList;
>public void setMarketList(Vector marketList)
>{
>   // SBgen: Assign variable
>   this.marketList = marketList;
>}
>
>public Vector getMarketList()
>{
>   // SBgen: Get variable
>   return(marketList);
>}
> }
>
> class Option
> {
>private String strValue;
>private String strDescription;
>
>public void setValue(String value)
>{
>   strValue = value;
>}
>
>public String getValue()
>{
>   return strValue;
>}
>
>public void setDescription(String description)
>{
>   strDescription = description;
>}
>
>public String getDescription()
>{
>   return strDescription;
>}
> }
>




Re: select options

2001-03-08 Thread Martin Cooper

The FormBean will be updated with the selection. Your DataBean will not be
modified.

--
Martin Cooper

- Original Message -
From: "Nick Pellow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 3:16 PM
Subject: Re: select options


>
>
> Martin Cooper wrote:
> >
> > It seems the documentation is wrong. It should be something like this
> > instead:
> >
> > - 8< -
> > The attribute name of the bean whose properties are consulted to
determine
> > which option should be pre-selected when rendering this input field. If
not
> > specified, the bean associated with the form tag we are nested within is
> > utilized. [RT Expr]
> > - 8< -
> >
> > As with the other form-related tags, I have never had to specify the
name
> > attribute, because I've always been able to use the default, meaning
"use
> > the form's bean".
>
>
> >
> > Hope this helps.
>
>
> Yes, that helps a lot.
> I want to do the above as I have a DataBean that stores commonly used
> lists of data. (credit card types, category names, brand names etc).
>
> I want to be able to use the same bean every time I want to display that
> data.
> Yet have my FormBean store the result of the users selection.
> Will the value on my FormBean be updated or the value on the DataBean be
> updated
> with the users selection?
>
> Cheers,
> Nick
>
> >
> > --
> > Martin Cooper
> >
> > - Original Message -
> > From: "Nick Pellow" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 07, 2001 5:01 PM
> > Subject: select options
> >
> > > Hi,
> > > Looking at:
> > >
> > > http://jakarta.apache.org/struts/struts-html.html#select
> > >
> > > I notice that for the name attribute, the following description is
> > > given:
> > > name   The fully-qualified java class name of the bean containing the
> > > underlying property. [RT Expr]
> > > Is this correct? I thought 'type' was usually used for class names and
> > > 'name' was used for variable names.
> > >
> > > Could someone please tell me what the name attribute means and when it
> > > should/shouldn't be used
> > > with select boxes?
> > >
> > > Cheers,
> > > Nick





Re: select options

2001-03-08 Thread Nick Pellow



Martin Cooper wrote:
> 
> It seems the documentation is wrong. It should be something like this
> instead:
> 
> - 8< -
> The attribute name of the bean whose properties are consulted to determine
> which option should be pre-selected when rendering this input field. If not
> specified, the bean associated with the form tag we are nested within is
> utilized. [RT Expr]
> - 8< -
> 
> As with the other form-related tags, I have never had to specify the name
> attribute, because I've always been able to use the default, meaning "use
> the form's bean".


> 
> Hope this helps.


Yes, that helps a lot. 
I want to do the above as I have a DataBean that stores commonly used 
lists of data. (credit card types, category names, brand names etc).

I want to be able to use the same bean every time I want to display that
data.
Yet have my FormBean store the result of the users selection.
Will the value on my FormBean be updated or the value on the DataBean be
updated
with the users selection?

Cheers, 
Nick

> 
> --
> Martin Cooper
> 
> - Original Message -
> From: "Nick Pellow" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 07, 2001 5:01 PM
> Subject: select options
> 
> > Hi,
> > Looking at:
> >
> > http://jakarta.apache.org/struts/struts-html.html#select
> >
> > I notice that for the name attribute, the following description is
> > given:
> > name   The fully-qualified java class name of the bean containing the
> > underlying property. [RT Expr]
> > Is this correct? I thought 'type' was usually used for class names and
> > 'name' was used for variable names.
> >
> > Could someone please tell me what the name attribute means and when it
> > should/shouldn't be used
> > with select boxes?
> >
> > Cheers,
> > Nick



Re: select options

2001-03-07 Thread Martin Cooper

It seems the documentation is wrong. It should be something like this
instead:

- 8< -
The attribute name of the bean whose properties are consulted to determine
which option should be pre-selected when rendering this input field. If not
specified, the bean associated with the form tag we are nested within is
utilized. [RT Expr]
- 8< -

As with the other form-related tags, I have never had to specify the name
attribute, because I've always been able to use the default, meaning "use
the form's bean".

Hope this helps.

--
Martin Cooper


- Original Message -
From: "Nick Pellow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 07, 2001 5:01 PM
Subject: select options


> Hi,
> Looking at:
>
> http://jakarta.apache.org/struts/struts-html.html#select
>
> I notice that for the name attribute, the following description is
> given:
> name   The fully-qualified java class name of the bean containing the
> underlying property. [RT Expr]
> Is this correct? I thought 'type' was usually used for class names and
> 'name' was used for variable names.
>
> Could someone please tell me what the name attribute means and when it
> should/shouldn't be used
> with select boxes?
>
> Cheers,
> Nick





RE: Select/Options Tag

2001-02-23 Thread Chalmers, Douglas

Thanks for that. Got it passing a string array now. Managed to pass all
options by calling a script function to select them all before posting.


"Chalmers, Douglas" wrote:

> A tag reference can maintain a String from a SELECT statement within a
> form bean, but only the ONE actually selected..
>
> How can I maintain ALL the OPTIONS within a SELECT box within a form
> bean??
>

This bug was just fixed, so you will need the most current nightly
release.  You can now have a property that returns a String array, and
use
it to back a SELECT statement that allows multiple options:


... Use  and/or  here ...


and Struts will correctly remember all of the selected values, based on
the contents of your array.

There is a test page (html-select.jsp) in the Struts test application
(struts-test.war) that illustrates how this works.


>
> Doug Chalmers
> Software Development
> Petrotechnics Ltd
> Exploration House
> Exploration Drive
> Aberdeen
> 707303 (Ext 14)

Craig





Re: Select/Options Tag

2001-02-22 Thread Craig R. McClanahan

"Chalmers, Douglas" wrote:

> A tag reference can maintain a String from a SELECT statement within a
> form bean, but only the ONE actually selected..
>
> How can I maintain ALL the OPTIONS within a SELECT box within a form
> bean??
>

This bug was just fixed, so you will need the most current nightly
release.  You can now have a property that returns a String array, and use
it to back a SELECT statement that allows multiple options:


... Use  and/or  here ...


and Struts will correctly remember all of the selected values, based on
the contents of your array.

There is a test page (html-select.jsp) in the Struts test application
(struts-test.war) that illustrates how this works.


>
> Doug Chalmers
> Software Development
> Petrotechnics Ltd
> Exploration House
> Exploration Drive
> Aberdeen
> 707303 (Ext 14)

Craig