; with the getter and setter methods.
Thanks.
Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.
-Original Message-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 6:04 PM
To: Tomcat Users List
Subject: RE: Easy question - Java Beans
() %%= pageBean.getStateName() %/option
% } %
HTH
Mark
-Original Message-
From: Denise Mangano [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 1:58 PM
To: 'Tomcat Users List'
Subject: RE: Easy question - Java Beans
Noel.
How would your original select look for the states?
I have a variable
Denise,
How would your original select look for the states?
Not sure what you are asking, but I'll take a stab, and you can come back
and correct me.
The NY is all you need to keep in the bean. I assume that somewhere you
have a loop that emits the option tags. When the value you are about
-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:08 PM
To: Tomcat Users List
Subject: RE: Easy question - Java Beans
Denise,
How would your original select look for the states?
Not sure what you are asking, but I'll take a stab, and you
can come back
Here's a sample from a form that uses states. The states are generated from
a class to keep less java on the jsp page, but you can see how the options
are generated and set to selected if they match the value in the bean.
select tabindex=7 name=State
option value=
--- Denise Mangano [EMAIL PROTECTED] wrote:
Just curious if anyone knows how to use bean
properties so that on a retry
of a form, the previously selected item in a select
list is maintained if
validated. For example, for Select Your State. If
I select NY, but
something else on my form is
Denise,
Start with your basic select tag, and then in your code that emits the
list of option tags, do something like this:
option value=' + stateCode + ' + ((stateCode.equals(currentStateCode))
? selected : ) + + stateName + /option
In other words, emit the
option value='NY'New