RE: Asking again - basic design question
I am designing a store check-out process. The old software (pre-struts) had a check at the top of each page to make sure the information from the previous page had been entered. And if not, forwarded to that page. So if you bookmarked the last page and went there, you would get forwarded back page by page and still start on the first page. I believe you might want to look at the Validator, and in particular into the page attribute of the validator, as well as the ValidatorActionForm/DynaValidatorActionForm classes. With it, you can assign a page number to fields field, and the Validator will check the validity of those fields only when it is their turn. (If your field is page=2, the Validator will not check it on page 1, but will check it on page 2, 3, and so on.) I am not sure how that would interact with bookmarks, but, presumably, if somebody had bookmarked a page, and then returned to the bookmark without any of the needed variables (say, if the needed values were only in the session, which had since expired), it would fail all the way back to the beginning. However, I have never implemented a multipage form, so I cannot say that is exactly how it would work.Check the documentation, as well as list archives (one such one at http://marc.theaimsgroup.com/?l=struts-user ) -- there have been a few discussions on multipage forms. -Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Asking again - basic design question
I guess the lack of responses is because there's not a standard as such for this. Many folks use actions for all links in their struts apps, as this way there's no exposure to the unpinning resources. I like doing this because there's always an opportunity to mess with stuff before any page is loaded. One way is to use the old define what you're trying to do in a paragraph, underline all the verbs. Use this to define your actions. As its an existing app I assume you've already go you OM in place, and the nouns in your paragraph will hopefully correspond to you objects in some way. Get you forms working and laid out, and try and avoid thinking in steps, think about save such-and-such and there fore you can reorganize your app by changing action forwards, rather than touching the java (I implicitly learnt that from Husted's examples e.g. mapping.findForward(success) or failure etc). I hope this is what you were looking for. Mark On Tuesday, August 12, 2003, at 02:35 AM, David Thielen wrote: Hi; I am designing a store check-out process. The old software (pre-struts) had a check at the top of each page to make sure the information from the previous page had been entered. And if not, forwarded to that page. So if you bookmarked the last page and went there, you would get forwarded back page by page and still start on the first page. For my new system (using struts), what's the suggested process: 1.. Something like that? Only to be real struts-like I would need to have it go to a page that immediately called an action to see if all data needed for that page was there yet. 2.. Keep a single url so they cannot go to any page other than the first, then the second, etc. In this case, going back in the browser and then clicking reload would take them back to the page they were on. 3.. Just do the standard struts action when they submit a page and in that action go back to the first page for which I have incomplete information. So they can bookmark and click the purchase submit but it would then take them back to the first page of the checkout process. So, what's standard out there? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Asking again - basic design question
You are asking several questions. One of them is how to bookmark a page in Struts (which uses Actions. I would have a hard time explaining it until you were comfortable w/ Actions; else you would get confused). Your other answer is: Struts uses Action, in action you must decide what page to forward to. (Never, ever, ask for a page, always ask for an action). So the user asks for action. Action find out how much data there is, and forward to the right place, pre populating known information. hth, .V David Thielen wrote: Hi; I am designing a store check-out process. The old software (pre-struts) had a check at the top of each page to make sure the information from the previous page had been entered. And if not, forwarded to that page. So if you bookmarked the last page and went there, you would get forwarded back page by page and still start on the first page. For my new system (using struts), what's the suggested process: 1.. Something like that? Only to be real struts-like I would need to have it go to a page that immediately called an action to see if all data needed for that page was there yet. 2.. Keep a single url so they cannot go to any page other than the first, then the second, etc. In this case, going back in the browser and then clicking reload would take them back to the page they were on. 3.. Just do the standard struts action when they submit a page and in that action go back to the first page for which I have incomplete information. So they can bookmark and click the purchase submit but it would then take them back to the first page of the checkout process. So, what's standard out there? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Asking again - basic design question
Hi; I am designing a store check-out process. The old software (pre-struts) had a check at the top of each page to make sure the information from the previous page had been entered. And if not, forwarded to that page. So if you bookmarked the last page and went there, you would get forwarded back page by page and still start on the first page. For my new system (using struts), what's the suggested process: 1.. Something like that? Only to be real struts-like I would need to have it go to a page that immediately called an action to see if all data needed for that page was there yet. 2.. Keep a single url so they cannot go to any page other than the first, then the second, etc. In this case, going back in the browser and then clicking reload would take them back to the page they were on. 3.. Just do the standard struts action when they submit a page and in that action go back to the first page for which I have incomplete information. So they can bookmark and click the purchase submit but it would then take them back to the first page of the checkout process. So, what's standard out there? thanks - dave