Thats what I thought myself, although it would be nice to be able to configure 
this independently within the xml configuration.

Maybe a stupid question but is it possible to call the specifc XML 
configuration from within the action?

-----Oorspronkelijk bericht-----
Van: Ed Griebel [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 14 november 2006 15:20
Aan: Struts Users Mailing List
Onderwerp: Re: Validation + multiple Submit buttons


You could turn off automatic validation in struts-config.xml and call
it manually in the action method when you need validation.

If you are using a recent version of Struts you can use
LookupDispatchAction that will call a given method based on which
button was pressed.

http://struts.apache.org/1.2.7/api/org/apache/struts/actions/LookupDispatchAction.html

HTH,
-ed

On 11/14/06, Andrew Martin <[EMAIL PROTECTED]> wrote:
> JS Free, clunky UI .... you don't have to tell us! But those are the 
> restrictions we are working on.
> It basically means additional actions/forms/JSP's when we want to do anything 
> of consequence. Usability is a big issue, but we can't do anyting about it.
>
> I don't think wrapping (nested) forms will actually work. certain form 
> buttons are located in the middle of the 'main' form as they cater for a 
> select option to another page.
>
>
>
> -----Oorspronkelijk bericht-----
> Van: Lance Semmens [mailto:[EMAIL PROTECTED]
> Verzonden: dinsdag 14 november 2006 14:54
> Aan: 'Struts Users Mailing List'
> Onderwerp: RE: Validation + multiple Submit buttons
>
>
> A JS free application? You can assume today's browsers have javascript, the 
> web would break otherwise. Sure there are some cross platform issues but to 
> go JS free is a tall order and will limit you to a clunky UI.
>
> If JS free is your direction, you could wrap your back button in a 
> <html:form> that posts to a different action to your save.
>
> Lance.
>
> -----Original Message-----
> From: Andrew Martin [mailto:[EMAIL PROTECTED]
> Sent: 14 November 2006 13:36
> To: Struts Users Mailing List
> Subject: Validation + multiple Submit buttons
>
> Hi,
>
> I have just begun to add validation to my forms using struts validator, which 
> is quite nice. I have however a problem when I have more than one submit 
> button on a form.
>
> For example I have a Save button and a Back button.
> The Back button is also a submit (instead of a standard button - basically 
> because we are creating a JS free applciation!)
>
> Within the struts configuration the validate is set to true for this action 
> with an input page defined.
> The validation is set to check certain fields are not empty.
>
> As both buttons call the same action the validation is called on both, but I 
> do not want validation to occur on certain submit actions (namely the Back 
> button)
>
> Ideally I would like to configure this in the XML Struts-config.xml or 
> validation.xml but I am not sure if this is actually possible (I fear the 
> worst)
>
> If anyone has any tips, much appreciated.
>
> Andrew
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to