You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Olivier THIERRY <ol...@gmail.com> on 2007/05/09 09:41:57 UTC

[S2] Can't make validation work

Hi,

I try to validate a form, but I can't make it work, and I don't understand
why ...

So I have the following form in a JSP :

    <s:actionerror />
    <s:form action="submitCreerDemandeAbsence" id="form1">
        <s:textfield
            id="matriculeDemandeur"
            name="demandeAbsence.matriculeDemandeur"
            label="Matricule"
            onchange="dojo.event.topic.publish('updateInfosDemandeurTopic',
this.value);"
            required="true"
            requiredposition="left"
            />
    </s:form>


My struts.xml file is as following (the action class is Spring managed) :

    <package name="absences" namespace="/absences" extends="struts-default">
        <action name="submitCreerDemandeAbsence"
class="creerDemandeAbsenceAction">
            <interceptor-ref name="defaultStack" />
            <result
name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp</result>
        </action>
    </package>

And I have the following submitCreerDemandeAbsence-validation.xml file :

<validators>
    <field name="demandeAbsence.matriculeDemandeur">
        <field-validator type="required">
            <message>Vous devez saisir ma matricule du demandeur.</message>
        </field-validator>
    </field>
</validators>

But it looks like the validation is never called ...

Can you tell me what I did wrong ?

Thanks in advance

Olivier

Re: [S2] Can't make validation work

Posted by Olivier THIERRY <ol...@gmail.com>.
Well, in my JSP I have lists (s:select tag) that are filled by the init
method of my action.
So when I redirect to the JSP, it crashes because the lists in my action
have not been initialized.
Can the prepare method be used to do this ?


2007/5/28, Dave Newton <ne...@yahoo.com>:
>
> --- Olivier THIERRY <ol...@gmail.com> wrote:
> > Well, no ... I thought actions could be POJOs ...
>
> They can.
>
> If you don't mind losing all the functionality or
> implementing it yourself.
>
> > <result name="input">
> >   /absences/initCreerDemandeAbsence.action
> > </result>
>
> Why wouldn't you forward to the input JSP?
>
> In any case, particularly when there's only one "real"
> method in the action, the Preparable interface might
> be a better idea... and can eliminate some manual
> busywork.
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [S2] Can't make validation work

Posted by Dave Newton <ne...@yahoo.com>.
--- Olivier THIERRY <ol...@gmail.com> wrote:
> Well, no ... I thought actions could be POJOs ...

They can.

If you don't mind losing all the functionality or
implementing it yourself.

> <result name="input">
>   /absences/initCreerDemandeAbsence.action
> </result>

Why wouldn't you forward to the input JSP?

In any case, particularly when there's only one "real"
method in the action, the Preparable interface might
be a better idea... and can eliminate some manual
busywork.

d.



 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Can't make validation work

Posted by Olivier THIERRY <ol...@gmail.com>.
Well, no ... I thought actions could be POJOs ...
Anyway, you are right, it works if my action class extends ActionSupport.

But I have another problem now ...

The input JSP page I want to redirect to contains lists filled from another
action.

So I configured it this way :

    <package name="absences" namespace="/absences" extends="struts-default">
        <action name="initCreerDemandeAbsence"
class="creerDemandeAbsenceAction" method="init">
            <result
name="success">/jsp/absences/creerDemandeAbsence.jsp</result>
        </action>
        <action name="submitCreerDemandeAbsence"
class="creerDemandeAbsenceAction">
            <interceptor-ref name="validationWorkflowStack" />
            <result
name="input">/absences/initCreerDemandeAbsence.action</result>
            <result
name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp</result>
        </action>
    </package>

In my CreerDemandeAbsenceAction class, the init method is as following :

    public String init() throws Exception {
        motifs = getServiceAbsence().getAllMotifsAbsence();

        this.valorisations = new HashMap();
        this.valorisations.put("M", "Matin");
        this.valorisations.put("AM", "Après-midi");
        this.valorisations.put("J", "Journée");

        return "success";
    }

But I have a 404 error, it can't find the url
"/absences/initCreerDemandeAbsence.action" URL, while it works when I type
this URL in my browser. Maybe I do it the wrong way to "initialize" my form
?

Thanks ;)

Olivier

2007/5/28, Dave Newton <ne...@yahoo.com>:
>
> --- Olivier THIERRY <ol...@gmail.com> wrote:
> > I still can't make it work :(
> > Anyone has an idea why it doesn't work ?
>
> I don't have your action code, but does it extend
> ActionSupport?
>
> d.
>
>
>
>       ____________________________________________________________________________________Shape
> Yahoo! in your own image.  Join our Network Research Panel today!
> http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [s2] how to get "onclick" working with ajax themed submit button

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Either use the 'handler' attribute of submit to specify the javascript 
function to call to submit your form, or add a listener with 
notifytopics/listentopics.

http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-dojoTopics

Jason Wyatt wrote:
> Hi, 
>
> We're using an ajax-themed submit button to submit a form. We now need to
> add an "onclick" trigger to call some javascript before it submits. However,
> the javascript never seems to be called when using the ajax theme on the
> submit button.
>
> Is there a way to trigger an "onclick" javascript event with an ajax-themed
> button? 
>
> Thanks in advance,
> Jason
>
>
> -----
> Falun Dafa  Truth - Compassion - Forbearance
>
> A mind & body practice under persecution in China
>
> http://www.faluninfo.net
>
>
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com] 
> Sent: Tuesday, 29 May 2007 12:02 AM
> To: Struts Users Mailing List
> Subject: Re: [S2] Can't make validation work
>
> --- Olivier THIERRY <ol...@gmail.com> wrote:
>   
>> I still can't make it work :(
>> Anyone has an idea why it doesn't work ?
>>     
>
> I don't have your action code, but does it extend ActionSupport?
>
> d.
>
>
>
>  
> ____________________________________________________________________________
> ________Shape Yahoo! in your own image.  Join our Network Research Panel
> today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[s2] how to get "onclick" working with ajax themed submit button

Posted by Jason Wyatt <jw...@itree.com.au>.
Hi, 

We're using an ajax-themed submit button to submit a form. We now need to
add an "onclick" trigger to call some javascript before it submits. However,
the javascript never seems to be called when using the ajax theme on the
submit button.

Is there a way to trigger an "onclick" javascript event with an ajax-themed
button? 

Thanks in advance,
Jason


-----
Falun Dafa  Truth - Compassion - Forbearance

A mind & body practice under persecution in China

http://www.faluninfo.net



-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Tuesday, 29 May 2007 12:02 AM
To: Struts Users Mailing List
Subject: Re: [S2] Can't make validation work

--- Olivier THIERRY <ol...@gmail.com> wrote:
> I still can't make it work :(
> Anyone has an idea why it doesn't work ?

I don't have your action code, but does it extend ActionSupport?

d.



 
____________________________________________________________________________
________Shape Yahoo! in your own image.  Join our Network Research Panel
today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Can't make validation work

Posted by Dave Newton <ne...@yahoo.com>.
--- Olivier THIERRY <ol...@gmail.com> wrote:
> I still can't make it work :(
> Anyone has an idea why it doesn't work ?

I don't have your action code, but does it extend
ActionSupport?

d.



      ____________________________________________________________________________________Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Can't make validation work

Posted by Olivier THIERRY <ol...@gmail.com>.
I still can't make it work :(
Anyone has an idea why it doesn't work ?

Thanks in advance

Olivier

2007/5/9, Olivier THIERRY <ol...@gmail.com>:
>
> So it should work with valdidate="false" ... But it doesn't ... So there's
> still something wrong in my configuration ...
> What is strange is that I can see validation errors in the logs. So it
> looks like Struts keeps on running the request while there are validation
> errors and so it should stop and call the input result !
>
> Did I write something wrong in the following configuration  ?
>
>         <action name="initCreerDemandeAbsence"
> class="creerDemandeAbsenceAction" method="init">
>             <result
> name="success">/jsp/absences/creerDemandeAbsence.jsp</result>
>         </action>
>         <action name="submitCreerDemandeAbsence"
> class="creerDemandeAbsenceAction">
>             <interceptor-ref name="defaultStack" />
>             <result
> name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp</result>
>             <result
> name="input">/absences/initCreerDemandeAbsence.action</result>
>         </action>
>
> The init method of my action loads list that will be used to fill select
> lists in the form.
> And the other method is the execute() one.
>
> Is there something special to do in action classes to make the validation
> work ?
>
>
> 2007/5/9, Guillaume Carré < guillaume.carre@gmail.com>:
> >
> > 2007/5/9, Torsten Römer < torsten.roemer@luniks.net>:
> > > I just called my validation file ActionClassName-validation.xml, don't
> > > even know what this alias is... and validation seems to work fine.
> >
> > it is because you have only one method in your action
> > you need aliases when you want to be able to call several methods in
> > your action from your view, and if you want one validation file per
> > method, you need to use aliases in the name of the validation xml
> > files
> >
> > > As far as I recall (can't check it right now) I did not have to set
> > > validate="true" for my form.
> >
> > validate="true" is for client side validation (javascript validation)
> >
> > --
> > Guillaume Carré
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: [S2] Can't make validation work

Posted by Olivier THIERRY <ol...@gmail.com>.
So it should work with valdidate="false" ... But it doesn't ... So there's
still something wrong in my configuration ...
What is strange is that I can see validation errors in the logs. So it looks
like Struts keeps on running the request while there are validation errors
and so it should stop and call the input result !

Did I write something wrong in the following configuration  ?

        <action name="initCreerDemandeAbsence"
class="creerDemandeAbsenceAction" method="init">
            <result
name="success">/jsp/absences/creerDemandeAbsence.jsp</result>
        </action>
        <action name="submitCreerDemandeAbsence"
class="creerDemandeAbsenceAction">
            <interceptor-ref name="defaultStack" />
            <result
name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp</result>
            <result
name="input">/absences/initCreerDemandeAbsence.action</result>
        </action>

The init method of my action loads list that will be used to fill select
lists in the form.
And the other method is the execute() one.

Is there something special to do in action classes to make the validation
work ?


2007/5/9, Guillaume Carré <gu...@gmail.com>:
>
> 2007/5/9, Torsten Römer <to...@luniks.net>:
> > I just called my validation file ActionClassName-validation.xml, don't
> > even know what this alias is... and validation seems to work fine.
>
> it is because you have only one method in your action
> you need aliases when you want to be able to call several methods in
> your action from your view, and if you want one validation file per
> method, you need to use aliases in the name of the validation xml
> files
>
> > As far as I recall (can't check it right now) I did not have to set
> > validate="true" for my form.
>
> validate="true" is for client side validation (javascript validation)
>
> --
> Guillaume Carré
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [S2] Can't make validation work

Posted by Guillaume Carré <gu...@gmail.com>.
2007/5/9, Torsten Römer <to...@luniks.net>:
> I just called my validation file ActionClassName-validation.xml, don't
> even know what this alias is... and validation seems to work fine.

it is because you have only one method in your action
you need aliases when you want to be able to call several methods in
your action from your view, and if you want one validation file per
method, you need to use aliases in the name of the validation xml
files

> As far as I recall (can't check it right now) I did not have to set
> validate="true" for my form.

validate="true" is for client side validation (javascript validation)

-- 
Guillaume Carré

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Can't make validation work

Posted by Torsten Römer <to...@luniks.net>.
I just called my validation file ActionClassName-validation.xml, don't
even know what this alias is... and validation seems to work fine.

As far as I recall (can't check it right now) I did not have to set
validate="true" for my form.
I am also using the ajax theme but I set it using the <s:head> tag,
while I set the theme of the form to simple. This is because I just want
the datetimepicker to work, but I don't want the <s:form> to create
markup because I want to create it manually.
This means also that validation errors are not displayed next to the
respective field but I use the <s:fielderror> tag instead, it creates an
 unordered list with all validation error messages.

Hope this helps you a little.

Torsten

Olivier THIERRY wrote:
> OK, it works now. Not perfectly, but it works.
> 
> Actually I had to name my validation file
> CreerDmandeAbsenceAction-submitCreerDemandeAbsence-validation.xml,
> beginning
> with an uppercase letter. Then I put this file in my action package as you
> said. But it worked only when I set the validate attribute of my form to
> true in the JSP ... When I set this attribute to false, the validation
> doesn't work at all. Maybe it's because I use Ajax theme ?
> But I still have problems, when i submit my form :
> - I have a Javascript popup for each datetimepicker in my form (message :
> "TypeError: row.cells has no properties")
> - There is no validation on radio buttons ...
> - When I submit my form a second time, the errors list is not reseted, so
> the remaining errors are displayed twice ...
> - The label for required fields turns to red ... but only for text fields
> and selects, but not for datetimepickers, radio buttons or textareas ...
> 
> Moreover, is there a way to group the error messages on top of the form,
> and
> not besides each field (I know it was the default behaviour with Struts 1
> but can't find how to do it with Struts 2).
> 
> Thanks for your help ;)
> 
> Olivier
> 
> 2007/5/9, Guillaume Carré <gu...@gmail.com>:
>>
>> 2007/5/9, Olivier THIERRY <ol...@gmail.com>:
>> > Well, it still doesn't work :(
>> > A few questions :
>> > - Do I have to put the xxx-validation.xml files in a specific directory
>> ? I
>> > put them in the WEB-INF/classes directory ...
>>
>> you have to put it in the same package than your action
>>
>> > - And has the first part of the validation xml file to be the action
>> name
>> > (name attribute in struts.xml file) or the action class name ? I didn't
>> find
>> > it clear in the documentation ...
>>
>> your validation file needs to have the following name:
>> ActionName-alias-validation.xml
>>
>> in your example:
>> creerDemandeAbsenceAction-submitCreerDemandeAbsence-validation.xml
>> -- 
>> Guillaume Carré
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Can't make validation work

Posted by Olivier THIERRY <ol...@gmail.com>.
OK, it works now. Not perfectly, but it works.

Actually I had to name my validation file
CreerDmandeAbsenceAction-submitCreerDemandeAbsence-validation.xml, beginning
with an uppercase letter. Then I put this file in my action package as you
said. But it worked only when I set the validate attribute of my form to
true in the JSP ... When I set this attribute to false, the validation
doesn't work at all. Maybe it's because I use Ajax theme ?
But I still have problems, when i submit my form :
- I have a Javascript popup for each datetimepicker in my form (message :
"TypeError: row.cells has no properties")
- There is no validation on radio buttons ...
- When I submit my form a second time, the errors list is not reseted, so
the remaining errors are displayed twice ...
- The label for required fields turns to red ... but only for text fields
and selects, but not for datetimepickers, radio buttons or textareas ...

Moreover, is there a way to group the error messages on top of the form, and
not besides each field (I know it was the default behaviour with Struts 1
but can't find how to do it with Struts 2).

Thanks for your help ;)

Olivier

2007/5/9, Guillaume Carré <gu...@gmail.com>:
>
> 2007/5/9, Olivier THIERRY <ol...@gmail.com>:
> > Well, it still doesn't work :(
> > A few questions :
> > - Do I have to put the xxx-validation.xml files in a specific directory
> ? I
> > put them in the WEB-INF/classes directory ...
>
> you have to put it in the same package than your action
>
> > - And has the first part of the validation xml file to be the action
> name
> > (name attribute in struts.xml file) or the action class name ? I didn't
> find
> > it clear in the documentation ...
>
> your validation file needs to have the following name:
> ActionName-alias-validation.xml
>
> in your example:
> creerDemandeAbsenceAction-submitCreerDemandeAbsence-validation.xml
> --
> Guillaume Carré
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [S2] Can't make validation work

Posted by Guillaume Carré <gu...@gmail.com>.
2007/5/9, Olivier THIERRY <ol...@gmail.com>:
> Well, it still doesn't work :(
> A few questions :
> - Do I have to put the xxx-validation.xml files in a specific directory ? I
> put them in the WEB-INF/classes directory ...

you have to put it in the same package than your action

> - And has the first part of the validation xml file to be the action name
> (name attribute in struts.xml file) or the action class name ? I didn't find
> it clear in the documentation ...

your validation file needs to have the following name:
ActionName-alias-validation.xml

in your example:
creerDemandeAbsenceAction-submitCreerDemandeAbsence-validation.xml
-- 
Guillaume Carré

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Can't make validation work

Posted by Olivier THIERRY <ol...@gmail.com>.
Well, it still doesn't work :(
A few questions :
- Do I have to put the xxx-validation.xml files in a specific directory ? I
put them in the WEB-INF/classes directory ...
- And has the first part of the validation xml file to be the action name
(name attribute in struts.xml file) or the action class name ? I didn't find
it clear in the documentation ...


2007/5/9, Guillaume Carré <gu...@gmail.com>:
>
> 2007/5/9, Olivier THIERRY <ol...@gmail.com>:
> > Hi,
> >
> > I try to validate a form, but I can't make it work, and I don't
> understand
> > why ...
> >
> > So I have the following form in a JSP :
> >
> >     <s:actionerror />
> >     <s:form action="submitCreerDemandeAbsence" id="form1">
> >         <s:textfield
> >             id="matriculeDemandeur"
> >             name="demandeAbsence.matriculeDemandeur"
> >             label="Matricule"
> >             onchange="dojo.event.topic.publish
> ('updateInfosDemandeurTopic',
> > this.value);"
> >             required="true"
> >             requiredposition="left"
> >             />
> >     </s:form>
> >
> >
> > My struts.xml file is as following (the action class is Spring managed)
> :
> >
> >     <package name="absences" namespace="/absences"
> extends="struts-default">
> >         <action name="submitCreerDemandeAbsence"
> > class="creerDemandeAbsenceAction">
> >             <interceptor-ref name="defaultStack" />
> >             <result
> >
> name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp</result>
> >         </action>
> >     </package>
> >
> > And I have the following submitCreerDemandeAbsence-validation.xml file :
> >
> > <validators>
> >     <field name="demandeAbsence.matriculeDemandeur">
> >         <field-validator type="required">
> >             <message>Vous devez saisir ma matricule du
> demandeur.</message>
> >         </field-validator>
> >     </field>
> > </validators>
> >
>
> try  <field-validator type="requiredstring">
>
> and add an "input" result to your action results
> --
> Guillaume Carré
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [S2] Can't make validation work

Posted by Guillaume Carré <gu...@gmail.com>.
2007/5/9, Olivier THIERRY <ol...@gmail.com>:
> Hi,
>
> I try to validate a form, but I can't make it work, and I don't understand
> why ...
>
> So I have the following form in a JSP :
>
>     <s:actionerror />
>     <s:form action="submitCreerDemandeAbsence" id="form1">
>         <s:textfield
>             id="matriculeDemandeur"
>             name="demandeAbsence.matriculeDemandeur"
>             label="Matricule"
>             onchange="dojo.event.topic.publish('updateInfosDemandeurTopic',
> this.value);"
>             required="true"
>             requiredposition="left"
>             />
>     </s:form>
>
>
> My struts.xml file is as following (the action class is Spring managed) :
>
>     <package name="absences" namespace="/absences" extends="struts-default">
>         <action name="submitCreerDemandeAbsence"
> class="creerDemandeAbsenceAction">
>             <interceptor-ref name="defaultStack" />
>             <result
> name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp</result>
>         </action>
>     </package>
>
> And I have the following submitCreerDemandeAbsence-validation.xml file :
>
> <validators>
>     <field name="demandeAbsence.matriculeDemandeur">
>         <field-validator type="required">
>             <message>Vous devez saisir ma matricule du demandeur.</message>
>         </field-validator>
>     </field>
> </validators>
>

try  <field-validator type="requiredstring">

and add an "input" result to your action results
-- 
Guillaume Carré

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


how to unsuscribe?

Posted by "Mr. nitin" <mr...@yahoo.com>.
I dont want mail from this user group and i sent mail for unsubscribe also but its not working ... tell me how to unsuscribe this user group?
   
  
Olivier THIERRY <ol...@gmail.com> wrote:
  Hi,

I try to validate a form, but I can't make it work, and I don't understand
why ...

So I have the following form in a JSP :



id="matriculeDemandeur"
name="demandeAbsence.matriculeDemandeur"
label="Matricule"
onchange="dojo.event.topic.publish('updateInfosDemandeurTopic',
this.value);"
required="true"
requiredposition="left"
/>



My struts.xml file is as following (the action class is Spring managed) :



class="creerDemandeAbsenceAction">

name="success">/jsp/absences/confirmerCreationDemandeAbsence.jsp




And I have the following submitCreerDemandeAbsence-validation.xml file :




Vous devez saisir ma matricule du demandeur.




But it looks like the validation is never called ...

Can you tell me what I did wrong ?

Thanks in advance

Olivier


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.