Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Awesome, thank you! Greg Lindholm wrote: Well that's about the most common question one sees on this list. Check this out: http://struts.apache.org/2.1.6/docs/how-do-we-repopulate-controls-when-validation-fails.html Timothy Orme wrote: Hi Greg, Thanks, I actually just stumbled acros

Re: Best Practices for Forms

2009-03-17 Thread Greg Lindholm
t;>>> >>>>> >>>>> >>>> type="redirect">ViewDataAction.do?id=%{dataId} >>>>> >>>>> >>>>> >>>>> /viewData.jsp >>>>> >>>>> >>>&

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Hi Greg, Thanks, I actually just stumbled across this. I'm actually having some problems with it however. I have it setup as follows: /form.jsp?id=${id} /form.jsp?id=${id} ViewData.action?id=${id}

Re: Best Practices for Forms

2009-03-17 Thread Greg Lindholm
>>> Hernán J. González >>> http://hjg.com.ar/ >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apach

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
So this actually doesn't seem to work. Seems that I can't have the dispatcher result have an action as a parameter. Seems like it can only find a jsp even if I write out the full path to the action. Does anyone have any other suggestions on this? Thanks, Tim Orme Timothy Orme wrote: Ok, I thin

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Ok, I think this works. If I do: ViewData.action?id=%{dataId} ViewForm.action And remove the redirect on "input", instead of ViewData.action?id=%{dataId} ViewForm.action Then I think this will be ok. On the chance that the user does have a validation error,

Re: Best Practices for Forms

2009-03-17 Thread Paweł Wielgus
Hi Timothy, You may consider flow like this: 1. request from browser 2. action on server 3. result returned to browser That way You can do as follows: 1. when receiving request for AddData 2. perform AddData action 3. then dispatch to apropriate forward 3.1. when with success redirect to ViewData

Re: Best Practices for Forms

2009-03-17 Thread Timothy Orme
Sorry to revive an old thread here, but I've run into another issue with this. I decided to go with the second of Hernan's recommendations here, so I now have the following "flow". 1. User visits "ViewForm.action". 2. User submits the form and we go to "AddData.action" 3. If the data validated

Re: Best Practices for Forms

2009-03-02 Thread Timothy Orme
Ok, this helps a lot. Simply from a usability standpoint though, the latter example seems more in line with what I'd want. It seems silly to have to bring the user to a page where, in my case, they would invariably click a link. I was aware of the TokenSession interceptor, and as you stated, it do

Re: Best Practices for Forms

2009-03-02 Thread hernan gonzalez
To avoid the problem of duplicated submissions (not only when refreshing the result page, but also when double clicking the submit button, or going back to the submited form and submitting again) you should take a look at the TokenSessionStoreInterceptor. But that is complementary with the other

Re: Best Practices for Forms

2009-03-02 Thread Timothy Orme
a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Mon, 2 Mar 2009 14:32:50 -0500 From: to...@genome.med.harvard.edu To: user@struts.apache.org Subject:

RE: Best Practices for Forms

2009-03-02 Thread Martin Gainty
ender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Mon, 2 Mar 2009 14:32:50 -0500 > From: to...@genome.med.harvard.edu > To: user@struts.apache.org > Subject: B

Best Practices for Forms

2009-03-02 Thread Timothy Orme
Hello All, I'm relatively new to Struts 2 and have a few questions as far as how to lay out a form correctly. I have the following scenario: 1. User is presented a form. (addData.jsp) 2. User submits form, we go off to an action to add form information to the database. (SubmitData.action) 3.