Do I understand properly that ActionSupport.validate method that you used
here performs the same validation as validation interceptor ?
How can I see if there were validation errors ?
benjamin haimerl wrote:
>
> hi boraldo
>
> a very simple way should be:
>
>
> Action:
>
> YourActionConnetedToTheFormAction extends Action..{
>
> execute(..){
>
> String qString = request.getQueryString();
> if(qString!=null && paramsFound(...))
> // *paramsFound() = check if your formParams were given by query String
> }
> else {
> //check if your formBean is set (depends on the scope you have set in
> your struts-config.xml)
> //e.g.
> if(request.getAttribute(yourForm)!=null) {
> yourForm.validate() {
> }
> }
> }
>
> }
>
> should work ;)
>
>
>
> boraldo wrote:
>> I have a form. And I want to have one url for form itself and for
>> submitting
>> it.
>> Controller should look at method and if it is GET, show form, if POST -
>> make
>> validations and so on.
>>
>> How can I do it ?
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/How-to-avoid-validation-if-request-was-done-by-GET-method--tp22709587p22727895.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]