Re: Form values getting empty After validation failure

2010-03-25 Thread Greg Lindholm
Does this FAQ entry help? http://struts.apache.org/2.x/docs/how-do-we-repopulate-controls-when-validation-fails.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.a

RE: Form values getting empty After validation failure

2010-03-25 Thread adam pinder
ct: Re: Form values getting empty After validation failure > From: pundari...@gmail.com > To: user@struts.apache.org > > Hi Adam, > > You are right. The problem is fixed now. However I am facing a different > issue now. I also have a couple of html select controls in the page. Fo

Re: Form values getting empty After validation failure

2010-03-24 Thread pundarik rajkhowa
ction it should > retrieve the value and re-display them > > i have a similar thing and it works fine. > > > > > > Date: Wed, 24 Mar 2010 11:45:49 +0530 > > Subject: Form values getting empty After validation failure > > Fro

RE: Form values getting empty After validation failure

2010-03-24 Thread adam pinder
works fine. > Date: Wed, 24 Mar 2010 11:45:49 +0530 > Subject: Form values getting empty After validation failure > From: pundari...@gmail.com > To: user@struts.apache.org > > Hi, > > I am using html file control to upload a file

Re: Form values getting empty After validation failure

2010-03-24 Thread Alex Rodriguez Lopez
Hi, don't know if it will be usefull, but some days ago someone in the user list suggested using the getters and setters of the properties that map to your form to call get() and put() methods of the current session ( ActionContext.getContext().getSession() ) , so you get "automatic" session

Form values getting empty After validation failure

2010-03-23 Thread pundarik rajkhowa
Hi, I am using html file control to upload a file. If file size exceeds a limit, then I return an error from Action class through ActionMessages object. The errors are displayed fine.The problem is that the input form has around 10 fields and after I return control to it for file size limit error

Repopulate List in Form on validation failure

2009-08-13 Thread David Miller
Struts 1.3.10 Is it possible to repopulate a List of Objects on an ActionForm upon validation failure? If so, how? Here's a simple example of what I'm trying: *JSP:* *Form:* String year; List yearList = new ArrayList(); public String getYear() { return year; } public vo

Re: Struts 2 - After validation failure populating the drop downs

2009-03-03 Thread hernan gonzalez
You should tell us how the dropdowns were populated in the first page. If only one Action class is involved, and the dropdowns are populated by reading some attribute of it (eg: getOptionListForDropDown() which looks at the optionListForDropDown list ) you should fill that list, not in the action

Re: Struts 2 - After validation failure populating the drop downs

2009-03-02 Thread Lukasz Lenart
Implement Preparable interface [1] and take a look on Prepare interceptor [2], it should be what you want [1] http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html [2] http://struts.apache.org/2.1.6/docs/prepare-interceptor.html Regards -- Lukasz http://ww

Re: Struts 2 - After validation failure populating the drop downs

2009-03-02 Thread Jim Kiley
validation fails, so if you have things that you want to make sure occur on validation failure, put them there. jk On Mon, Mar 2, 2009 at 1:30 PM, Sundararaman, Anand < anand.sundarara...@ps.net> wrote: > Hi, > Would you able to specify in little more detail? Sorry for that as I

RE: Struts 2 - After validation failure populating the drop downs

2009-03-02 Thread Sundararaman, Anand
Hi, Would you able to specify in little more detail? Sorry for that as I am new to Struts 2. Thanks, Anand -Original Message- From: Jim Kiley [mailto:jhki...@summa-tech.com] Sent: Monday, March 02, 2009 12:23 PM To: Struts Users Mailing List Subject: Re: Struts 2 - After validation

Re: Struts 2 - After validation failure populating the drop downs

2009-03-02 Thread Jim Kiley
Populating the dropdowns in an input() method that returns Action.INPUT should do the trick. jk On Mon, Mar 2, 2009 at 1:19 PM, Sundararaman, Anand < anand.sundarara...@ps.net> wrote: > Hi, > I guess there is an elegant solution for this but I could not find out in > the user list. > > I am usin

Struts 2 - After validation failure populating the drop downs

2009-03-02 Thread Sundararaman, Anand
Hi, I guess there is an elegant solution for this but I could not find out in the user list. I am using Struts 2 and creating some form validations. If a validation fails on a JSP screen, the input result takes back the control to the same screen, but the drop downs are not populated. I nee

RE: file upload file location lost on validation failure

2009-01-06 Thread Derrick Koes
iling List Subject: Re: file upload file location lost on validation failure Derrick Koes wrote: > There is a value attribute on the file tag from which you can preset the > value according to docs. > > http://struts.apache.org/2.0.14/docs/file.html > > It seems like the value

Re: file upload file location lost on validation failure

2009-01-06 Thread Dave Newton
Derrick Koes wrote: There is a value attribute on the file tag from which you can preset the value according to docs. http://struts.apache.org/2.0.14/docs/file.html It seems like the value could be "updated" from the user input, if the input data is available. File input values cannot be prel

RE: file upload file location lost on validation failure

2009-01-06 Thread Derrick Koes
ave Newton [mailto:newton.d...@yahoo.com] Sent: Tuesday, January 06, 2009 12:29 PM To: Struts Users Mailing List Subject: Re: file upload file location lost on validation failure Derrick Koes wrote: > Understood. However, if the value used to populate the field is on the > value stack, t

Re: file upload file location lost on validation failure

2009-01-06 Thread Dave Newton
Derrick Koes wrote: Understood. However, if the value used to populate the field is on the value stack, the input will be populated with the value on validation failure, except in this case it seems as the data necessary to repopulate is not available. I think we're talking past each

RE: file upload file location lost on validation failure

2009-01-06 Thread Derrick Koes
Understood. However, if the value used to populate the field is on the value stack, the input will be populated with the value on validation failure, except in this case it seems as the data necessary to repopulate is not available. Derrick -Original Message- From: Dave Newton

Re: file upload file location lost on validation failure

2009-01-06 Thread Dave Newton
Derrick Koes wrote: Using the demo app (struts2-showcase-2.0.14/fileupload) and entering an empty file, for example, will correctly cause validation to fail. However, the file location disappears from the input. Is this as designed? Do you mean in the file input field? If so, that's normal bro

file upload file location lost on validation failure

2009-01-06 Thread Derrick Koes
Using the demo app (struts2-showcase-2.0.14/fileupload) and entering an empty file, for example, will correctly cause validation to fail. However, the file location disappears from the input. Is this as designed? Thanks, Derrick

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2008-12-17 Thread Tobias M.
sage in context: http://www.nabble.com/ModelDriven-CRUD-validation-failure-still-causes-JPA-update-tp12987242p21062748.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...

Executing Action on validation failure.

2008-10-13 Thread j alex
Hi, I need to implement an use case where the data needs to be saved in DB, even though all the submitted form fields aren't valid. The rule is to make those fields empty and insert whatever is good into the DB (there are few non-nillable fields that need to be valid as a prerequisite). I don't wa

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2008-03-10 Thread Fabiano Franz
ervices >> ECOS Development Team >> [EMAIL PROTECTED] >> 970-226-9290 >> >> Fort Collins Science Center >> US Geological Survey >> 2150 Centre Ave, Building C >> Fort Collins, CO 80526-8116 >> >> >> >> "Al Sutt

Re: s:action with validation failure of form submit

2008-01-27 Thread jwpronto
n java source > > M- > - Original Message - > From: "jwpronto" <[EMAIL PROTECTED]> > To: > Sent: Saturday, January 26, 2008 6:41 PM > Subject: s:action with validation failure of form submit > > >> >> Hi All - >> >> I have

Re: s:action with validation failure of form submit

2008-01-26 Thread Martin Gainty
please post: jsp xwork.xml entries for actionTag Action java source M- - Original Message - From: "jwpronto" <[EMAIL PROTECTED]> To: Sent: Saturday, January 26, 2008 6:41 PM Subject: s:action with validation failure of form submit > > Hi All - > > I have a

s:action with validation failure of form submit

2008-01-26 Thread jwpronto
Hi All - I have an s:action tag embedded in a JSP. The s:action populates a List in the request which a select box uses to populate. When there is a validation failure the s:action tag is not being called. The interesting thing is that I have this exact setup on a previous page (this is a 3

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread cilquirm
ly using transactions? > > If so why not modify the interceptor to only commit if a SUCCESS is > returned > or perform a rollback if ERROR is returned from the action invocation. > > Al. > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread Musachy Barroso
9290 > > Fort Collins Science Center > US Geological Survey > 2150 Centre Ave, Building C > Fort Collins, CO 80526-8116 > > > > "Al Sutton" <[EMAIL PROTECTED]> > 10/02/2007 12:14 AM > Please respond to > "Struts Users Mailing List" >

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread Jon_French
uot;Struts Users Mailing List" To "'Struts Users Mailing List'" cc Subject RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED Just a thought, are you actually using transactions? If so why not modify the interceptor to only commit if a SU

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-01 Thread Al Sutton
October 2007 04:04 To: Struts Users Mailing List Subject: Re: ModelDriven CRUD validation failure still causes JPA update - RESOLVED OK: I've fixed the problem. I'm not sure why this was the case, but here is what was causing the problem: In my ModelDriven action, I had a method

Re: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-01 Thread Jon_French
e Ave, Building C Fort Collins, CO 80526-8116 [EMAIL PROTECTED] 10/01/2007 08:29 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update Unfortunately, it app

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
ase respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update Only difference is that I don't use model driven. Is there any setting to tell hibernate to flush the session when c

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
rs Mailing List cc Subject Re: ModelDriven CRUD validation failure still causes JPA update --- [EMAIL PROTECTED] wrote: > That's an interesting idea Dave. I'm using the > paramsPrepareStack. It'll take some investigation to > see if that would fix the issue. Shouldn&#

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
ASRC Management Services > ECOS Development Team > [EMAIL PROTECTED] > 970-226-9290 > > Fort Collins Science Center > US Geological Survey > 2150 Centre Ave, Building C > Fort Collins, CO 80526-8116 > > > > "Musachy Barroso" <[EMAIL PROTECTED]>

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
IL PROTECTED]> 10/01/2007 05:10 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update I only use the beanutils.copy solution on a few places, on the other cases I a

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
don't have to do this copy but can rather cut out the old Struts 1 ActionForm "middle-man" bean and do direct updates to your business objects. Everything works great except this one problem with a validation failure inappropriately triggering a database update. * manage

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
I only use the beanutils.copy solution on a few places, on the other cases I always load the object model on the prepare() method if the "id" field is set (editing), and then call update or create on the entity manager in my action method. I never got that problem so I'm wondering what is different

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > That's an interesting idea Dave. I'm using the > paramsPrepareStack. It'll take some investigation to > see if that would fix the issue. Shouldn't take much; it might be as simple as adding a validate/defaultWorkFlow up towards the top (although I might try just add

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
cal Survey 2150 Centre Ave, Building C Fort Collins, CO 80526-8116 Dave Newton <[EMAIL PROTECTED]> 10/01/2007 03:32 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: ModelDriven CRUD validation failure still causes JPA update I

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
> * instantiate a temporary bean used for the form only: > BeanUtils.copyProperties(tempBean, yourBean); > That's what I do. musachy -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAI

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Piero Sartini
> Since my Model is acquired from the Hibernate session (during the > "prepare()" Action method), it is a transactional persistent instance. > Note this from the hibernate documentation: > > "Transactional persistent instances (ie. objects loaded, saved, created or > queried by the Session) may be

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Dave Newton
CO 80526-8116 > > > > "Musachy Barroso" <[EMAIL PROTECTED]> > 10/01/2007 02:42 PM > Please respond to > "Struts Users Mailing List" > > > To > "Struts Users Mailing List" > cc > > Subject > Re: ModelDrive

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
:42 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update If there is a validation error the code on your action shouldn't be executed at all, so you wouldn't hav

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
If there is a validation error the code on your action shouldn't be executed at all, so you wouldn't have this problem. Are you applying the "defaultWorkflow" interceptor to your action? regards musachy On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a ModelDriven action which c

ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
I have a ModelDriven action which controls CRUD operations on JPA managed Entity E. E has a property called ?name? which maps to a database column with a NOT NULL constraint. I have added a RequiredStringValidator annotation to my Action to validate that the ?model.name? property is non-null. T

Re: Validation Failure

2004-12-30 Thread Cliff
displaying the message in jsp != it can read in the Validator I also encountered this problem before. Cliff --- In [EMAIL PROTECTED], "elisegev1" <[EMAIL PROTECTED]> wrote: > > I am learning how to use Struts and have encountered the following > problem. I have a form bean defined as 'DynaAc

Validation Failure

2004-12-24 Thread elisegev1
I am learning how to use Struts and have encountered the following problem. I have a form bean defined as 'DynaActionForm' with properties defined in struts-config.xml. In validation.xml I specify the validation rules for some of the properties - not all. The source code for the generated pa