You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by prkumar_1234 <pr...@yahoo.com> on 2006/11/30 04:46:14 UTC
problem in formbean
I got some problem in struts can you please help me.
1) in jsp iam displaying values from javabean in textboxes.(i can
change
these values)
2) when i submit with modified values , iam doing validation in
formbean.
3) When validatio fails i formbean returning to same jsp but it is
displaying old values not modified values
can you give me some hint how to do this.
thank you verymuch
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problem in formbean
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
prkumar,
prkumar_1234 wrote:
> 1) in jsp iam displaying values from javabean in textboxes.(i can
> change
> these values)
> 2) when i submit with modified values , iam doing validation in
> formbean.
> 3) When validatio fails i formbean returning to same jsp but it is
> displaying old values not modified values
I'm guessing that your action mapping looks something like this:
<action path="/edit"
type="...">
<forward name="success" path="/edit.jsp" />
</action>
<action path="/save"
type="..."
name="..."
validate="true"
input="/edit.do">
<forward name="success" path="...">
</action>
Note that the 'input' attribute is set to "edit.do", which will re-run
your action and probably re-fetch the original values. You need to make
sure that your input points to the "edit.jsp" page.
If that's not the problem, then do you have code in your JSP that
fetches the original values from somewhere (like a database)? Or, do you
use actions for that kind of thing?
Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFbuOg9CaO5/Lv0PARAuBrAKCGsLR/OEPjH098CttCtlUqur/o5gCcDGkI
Fc29gGupfpPFKvYAahhUIzc=
=Gkpe
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: problem in formbean
Posted by James Mitchell <jm...@apache.org>.
Hi, I help moderate messages on this list. You are not subscribed. I let
this message through because it is not spam, but you need to subscribe
before any more can come through.
Thanks.
On 11/29/06, prkumar_1234 <pr...@yahoo.com> wrote:
>
> I got some problem in struts can you please help me.
>
> 1) in jsp iam displaying values from javabean in textboxes.(i can
> change
> these values)
> 2) when i submit with modified values , iam doing validation in
> formbean.
> 3) When validatio fails i formbean returning to same jsp but it is
> displaying old values not modified values
>
> can you give me some hint how to do this.
>
> thank you verymuch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
James Mitchell
678.910.8017
Re: problem in formbean
Posted by thamizh arasu <th...@yahoo.com>.
Hi Prem,
At the time of landing the page, you are showing some values. That values are taken from DB. Once error coming you are redirecting to the same page. but with the error value.
This is your problem right?
this can be easily solved. you are showing the values taken from formbean. At the time of error, the new value (error value) would be stored in the formbean. so that error value has been shown to you.
show the value from DB. your problem will be solved. sorry for my english
prkumar_1234 <pr...@yahoo.com> wrote: I got some problem in struts can you please help me.
1) in jsp iam displaying values from javabean in textboxes.(i can
change
these values)
2) when i submit with modified values , iam doing validation in
formbean.
3) When validatio fails i formbean returning to same jsp but it is
displaying old values not modified values
can you give me some hint how to do this.
thank you verymuch
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
BY
Thamizharasu S
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
RE: problem in formbean
Posted by "Saeed, Rada" <ra...@eds.com>.
Is this value a long or int, or whatever numeric value,
And u r trying to enter characters in it then validation fails ?
Cuz if so the Struts won't be able to populate the long with the string
value
U entered and in this case it'll keep it's old numeric value.
In case of validating numeric fields always make them Strings in the
form,
To be able to keep the updated value after the validation fails.
-----Original Message-----
From: notify@yahoogroups.com [mailto:notify@yahoogroups.com] On Behalf
Of prkumar_1234
Sent: Thursday, November 30, 2006 5:46 AM
To: struts-user@jakarta.apache.org
Subject: problem in formbean
I got some problem in struts can you please help me.
1) in jsp iam displaying values from javabean in textboxes.(i can change
these values)
2) when i submit with modified values , iam doing validation in
formbean.
3) When validatio fails i formbean returning to same jsp but it is
displaying old values not modified values
can you give me some hint how to do this.
thank you verymuch
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org