Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Eric Lentz
So when this error condition is met and the user redirected back to the INPUT form; the field where they had entered xyz is now the original default initialized value. Can't you check the action error and not refresh the model when there is an error?

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
, May 19, 2011 11:58 AM To: Struts Users Mailing List Subject: Re: Struts2 Validation w/ModelDriven So when this error condition is met and the user redirected back to the INPUT form; the field where they had entered xyz is now the original default initialized value. Can't you check the action

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Aaron Brown
Users Mailing List Subject: Re: Struts2 Validation w/ModelDriven So when this error condition is met and the user redirected back to the INPUT form; the field where they had entered xyz is now the original default initialized value. Can't you check the action error and not refresh the model

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread Eric Lentz
: CRANFORD, CHRIS chris.cranf...@setech.com To: Struts Users Mailing List user@struts.apache.org Date: 05/19/2011 01:16 PM Subject: RE: Struts2 Validation w/ModelDriven Not that I am aware. The paramsPrepareParamsStack to my knowledge handles validation at the very end; so by the time validation has

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
that has been initialized in either prepare() or the execute() or entry point method calls themselves. -Chris -Original Message- From: Eric Lentz [mailto:eric.le...@sherwin.com] Sent: Thursday, May 19, 2011 1:22 PM To: Struts Users Mailing List Subject: RE: Struts2 Validation w

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Dave Newton
On Thu, May 19, 2011 at 2:22 PM, Eric Lentz eric.le...@sherwin.com wrote: I'm curious. If you are using ModelDriven, then why do you load your model in prepare()? Why not in getModel? That'd mean you'd need the did I already load the model? code in getModel(), wouldn't it? Seems cleaner to use

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Dave Newton
On Thu, May 19, 2011 at 3:55 PM, CRANFORD, CHRIS wrote: The framework will call getModel() multiple times before your validate() and execute() methods are invoked; and so by adding the create/lookup logic to getModel(); you would then have to wrap that block of code around a null check so that

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread Chris Pratt
themselves. -Chris -Original Message- From: Eric Lentz [mailto:eric.le...@sherwin.com] Sent: Thursday, May 19, 2011 1:22 PM To: Struts Users Mailing List Subject: RE: Struts2 Validation w/ModelDriven I'm curious. If you are using ModelDriven, then why do you load your model