I have 20-25 combo-boxes in a single page.Each combo-box contains number
of values and corresponding description.
If I use a collection to populate all the options in all the combo-box,I
have to define 20 javabeans and then keep them in scope.
Is there any other easier way to do it using Struts
Hi there.
How can I construct STRUTS select options tag according to a parameter ?
I got a jsp named example_1.jsp.
One accesses the page with a parameter like example_1.jsp?id=2 .
Now what I wanna do is that the example_1.jsp get the value of id
parameter and construct select options tag
with Struts, for a working example of using a plugin to create a
LabelValue collection.
-Ted.
Fumitada Hattori wrote:
Hi there.
How can I construct STRUTS select options tag according to a parameter ?
I got a jsp named example_1.jsp.
One accesses the page with a parameter like example_1.jsp?id=2
Hi,
I'm trying to populate a drop down list with integers.
Basically, I want the following to be generated:
select
option value=11/option
option value=22/option
option value=33/option
option value=44/option
/select
Is there an easy way to do this? I
Have you looked at label-value?
-Original Message-
From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
Sent: March 31, 2003 3:00 PM
To: Struts Users Mailing List
Subject: Populate select options with Integers
Hi,
I'm trying to populate a drop down list with integers.
Basically, I want
: Populate select options with Integers
Hi,
I'm trying to populate a drop down list with
integers.
Basically, I want the following to be generated:
select
option value=11/option
option value=22/option
option value=33/option
option value=44/option
] wrote:
Have you looked at label-value?
-Original Message-
From: Dhruva B. Reddy
[mailto:[EMAIL PROTECTED]
Sent: March 31, 2003 3:00 PM
To: Struts Users Mailing List
Subject: Populate select options with Integers
Hi,
I'm trying to populate a drop down list
Hello,
I have a form with two select tags. I want the options for the second to be
dependent on the option chosen for the first. What is the best way to
accomplish this? If java script is the answer, how do I obtain the value of
the option chosen in the first select (I'm new to web apps)?
What
PROTECTED]
Sent: Tuesday, March 11, 2003 1:46 PM
To: [EMAIL PROTECTED]
Subject: generating select options from a previous select
Hello,
I have a form with two select tags. I want the options for
the second to be
dependent on the option chosen for the first. What is the best way
To: [EMAIL PROTECTED]
Subject: generating select options from a previous select
Hello,
I have a form with two select tags. I want the options for the second to be
dependent on the option chosen for the first. What is the best way to
accomplish this? If java script is the answer, how do I obtain
No, it doesn't. At least it didn't for me. value from html:option
value=%= firstName % doesn't work.
It would be so great if there were a way to create a concatenated label for a
select menu. Currently, I have a getDisplay() in some of my beans, which
returns a concatenation of some other
Heather,
What exactly do you mean by doesn't work? Is an exception thrown? Is the
output rendered incorrectly?
Quoting Heather Buch [EMAIL PROTECTED]:
No, it doesn't. At least it didn't for me. value from html:option
value=%= firstName % doesn't work.
It would be so great if there were a
Hi, Im using the RowSetDynaClass to produce a java.util.List of values from
a database which are displayed in
the JSP as follows:-
html:select property=myFormField size=1
html:options collection=Names property=first_name
labelProperty=first_name /
/html:select
Think this'll work:
html:select property=myFormField size=1
logic:iterate id=name name=Names
bean:define id=firstName name=name property=first_name/
html:option value=%= firstName %
bean:write name=firstName/bean:write name=name property=last_name/
/html:option
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
.
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
Is it possible for me to have something like this:
html:select property=userType
html:options property=userTypes/
/html:select
where on my ActionForm, I have something like this:
public UserType getUserType()
public Collection getUserTypes()
public void setUserType(UserType
Hello list people
I'm using struts 1.0.
I have a User object with a string array availableGroups. I want to
generate a select options list from this array in a jsp.
Using a session bean of type User named currentUser, I can iterate the
array like this:
logic:iterate id=x name=currentUser
with
this form)
cheers
matthew
On Wed, 13 Nov 2002 11:24:18 +
matthew yee-king [EMAIL PROTECTED] wrote:
I'm using struts 1.0.
I have a User object with a string array availableGroups. I want to
generate a select options list from this array in a jsp.
Using a session bean of type User named
I have a form that repeats a credit card validation portion multiple times.
What is the best way to only have to write html:select/html:options once? Is
there a way to give the first use an id and then refer to that by reference?
thx
andy kriger
--
To unsubscribe, e-mail:
No - but you can sure put the collection in application scope, if that
data is static.
Andy Kriger wrote:
I have a form that repeats a credit card validation portion multiple times.
What is the best way to only have to write html:select/html:options once? Is
there a way to give the first use an
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
html:select property=name_of_property_in_form_bean
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
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
html:select property=name_of_property_in_form_bean
Smith, Johnathan M
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
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
html:select property
Subject: Struts select/options tags usage...
From: Scott Curtis [EMAIL PROTECTED]
===
Hi,
I have a JSP with the following scriplet:
%
// Set up the server names list
ServerNamesForm form =
(ServerNamesForm)request.getAttribute(serverNamesForm);
ArrayList list = form.getServerNames
Vehiclepark is a Bean with the property cars (cars is a collection of a
Car).
Car is a bean with the properties id and vehicleparkId
hier ist my jsp-code
logic:iterate name=Vehiclepark property=cars id=Car html:hidden
name=Car property=id indexed=true/ html:select name=Car
: Forcing a form-reload OR
a select Options
03/13/02 11:30 reload
PM
Please respond
OR a select Options reload
Is there a way to cause an html select control to reload from a different
collection -OR- to update the collection and have the html select be
refreshed?
If I have:
html:select property=psdIndustryType size=1
html:options collection=psindustrytype property=value
/
html:option value=value_3/
/html:select
-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
Hello,
On Fri, 11 Jan 2002 15:48:31 -0800
Jason Wells [EMAIL PROTECTED] wrote:
Using the html:option tag, is there a way to set an option to be
initially selected? I'm looking for something equivalent to
option value=blah selectedblah/option
I don't see mention of this in the online
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.
Thanks for the summarized info.
Using the html:option tag, is there a way to set an option to be
initially selected? I'm looking for something equivalent to
option value=blah selectedblah/option
I don't see mention of this in the online docs for the HTML taglib.
Thanks,
Jason
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
)
at
org.apache.struts.util.PropertyUtils.setIndexedProperty(PropertyUtils.java:688)
I'm quite new to Struts, and can't understand what I'm doing wrong!
Is it actually possible to use multiple select options with indexed
properties? Any ideas? Thanks!
Michael
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
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
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
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 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 Co
Help! Unable to send back muliple select options.
// Define the Array
protected String[] geography;
// Get the Array
public String[] getGeography() {
return (geography);
}
// Set the Array
public void setGeography(String[] geography) {
{ this.geography = geography
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
rom: "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 examples I've seen using html:options name="someBean"
property="someProperty" / all seem to reference a collection defined in the
same jsp as the options tag. Could someone provide a rookie with an example
where the collection bean is not defined in the same jsp, but rather by, say
an action
]
Subject: Re: Struggling with select/options
Did you put an int in your collection ? Did you try with a Integer ?
Not in the collection of course but check you don't have an
int which should
be an Integer or a String somewhere.
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..
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??
Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
"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
49 matches
Mail list logo