Re: Variable 'input' attribute in struts-config.xml

2006-06-11 Thread Scott Van Wart
Niall Pemberton wrote: 1) Do the "out of the box" falvours cater for your needs? There are 2 - using the form name as the validation key, or using the action mapping. Using the action mapping _might_ work, ... right now I'm doing this: But then I'd still

Re: Variable 'input' attribute in struts-config.xml

2006-06-10 Thread Niall Pemberton
On 6/10/06, Scott Van Wart <[EMAIL PROTECTED]> wrote: Dave Newton wrote: > So I still keep all my simple, non-business-logic validations in the > validation config file. Just call validate on the form: if it's a ValidatorForm or > ValidatorActionForm or subclass (or Dynas) it just works. > OK,

Re: Variable 'input' attribute in struts-config.xml

2006-06-10 Thread Scott Van Wart
Dave Newton wrote: So I still keep all my simple, non-business-logic validations in the validation config file. Just call validate on the form: if it's a ValidatorForm or ValidatorActionForm or subclass (or Dynas) it just works. OK, I've no problem caling validate() from the DispatchAction,

Re: Variable 'input' attribute in struts-config.xml

2006-06-10 Thread Dave Newton
Scott Van Wart wrote: > Right, but the difficulty here is that the validation then has to be > done in the action, and I can't rely on the 'validate="true"' to use > ValidatorForm's validate() method and dump my simple, > non-database-reliant validations into validations.xml. Many of us _never_ us

Re: Variable 'input' attribute in struts-config.xml

2006-06-09 Thread Scott Van Wart
Michael Jouravlev wrote: After you filled in the form, you call EntityAction with "store" command. It validates the input and then tries to update/store data. If input is not valid, the action checks the state field and forward to a JSP that corresponds to that state. The page will be displayed a

Re: Variable 'input' attribute in struts-config.xml

2006-06-09 Thread Michael Jouravlev
What I would do is having an AvailableItems web resource with two states: "no items" (default) and "items found". For "no items" it would render a search page, for "items found" it would render items list. Michael. On 6/9/06, Albert L. Sapp <[EMAIL PROTECTED]> wrote: Scott, I think your approa

Re: Variable 'input' attribute in struts-config.xml

2006-06-09 Thread Michael Jouravlev
Hi Scott, this is how I would implemented it. What we have is a standard CRUD stuff for Entity object. There are two ways to navigate to Entity. Either you simply navigate to it and it renders itself according to its state, or you navigate to it with a certain command, like "view" or "update" or

Re: Variable 'input' attribute in struts-config.xml

2006-06-09 Thread Albert L. Sapp
Scott Van Wart wrote: Michael Jouravlev wrote: I suggest to look at your issue from another perspective. Do you really need the functionality you are asking for? First, a small clarification. There is no input page for an action, "input" attribute is poorly named, it should be called "error" o

Re: Variable 'input' attribute in struts-config.xml

2006-06-08 Thread Scott Van Wart
Michael Jouravlev wrote: I suggest to look at your issue from another perspective. Do you really need the functionality you are asking for? First, a small clarification. There is no input page for an action, "input" attribute is poorly named, it should be called "error" or "errorTarget", because

Re: Variable 'input' attribute in struts-config.xml

2006-06-08 Thread Michael Jouravlev
On 6/8/06, Scott Van Wart <[EMAIL PROTECTED]> wrote: I have two different pages that call the same action. I'm using validate="true" in the action mapping. Can I specify the 'input' attribute dynamically (or set it somewhere while the action is being called, before validation?). You cannot ch

RE: Variable 'input' attribute in struts-config.xml

2006-06-08 Thread Ralf Stoltze
hi. > I have two different pages that call the same action. I'm > using validate="true" in the action mapping. Can I specify > the 'input' > attribute dynamically (or set it somewhere while the action > is being called, before validation?). never tried, but ... your action's execute method

Variable 'input' attribute in struts-config.xml

2006-06-08 Thread Scott Van Wart
I have two different pages that call the same action. I'm using validate="true" in the action mapping. Can I specify the 'input' attribute dynamically (or set it somewhere while the action is being called, before validation?). Thanks, Scott -