File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to solve this
Joined: Feb 22, 2007
Apr 24, 2008 00:43:00
I developed login form in
In this form i have 2 fields.
<bean:message key="label.login" />
<html:select property="district" styleId="dist" >
<option value="0"> --Select District--</option>
<bean:message key="label.password" />
the Login values are dynamically loaded using ajax in district select box.
Related form bean is as LoginForm , in validate method
//System.out.println("am h ere"+getMonth());
Its giving the error message properly.
But my old value in select box does not retained.
How to retain my old value in select box.
Joined: Nov 29, 2005
Apr 24, 2008 00:56:00
Verify that in validate method are you getting value of district? if yes then you are resetting your form values back or your ajax code might resetting the value of district in your form.
Joined: Mar 22, 2008
Apr 24, 2008 01:05:00
What scope are you setting for your action?
If it's request, Struts will create a new form bean when you're forwarded to the input page, and your values will be lost (since you only asked for them to be kept in the request).
There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Joined: Feb 22, 2007
Apr 24, 2008 01:27:00
Thanks for your reply.
Can you explain how can i populate values into select box from database while
form loading itself.
Currently am using ajax , I want to know how can i do this without using ajax
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: How to solve this
Problem in SessionManagement in Struts
doubt regarding <html:select>
error in form display?
Struts Validation Empty alert Box
Problem in Creating Dynamic Link from Display Table
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015