struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: TabbedPanel and Ajax Validation
Date Tue, 22 May 2007 23:17:27 GMT
Those scripts are included by the head tag if I don't remember wrong, so set
theme="xhtml" or "css_xhtml" (on the head tag). I haven't use DWR before so
I can't help you much. Did you configure it on web.xml?

Rest assured that ajax validation is way easier in 2.1 (just add an
interceptor to your action).

musachy

On 5/22/07, jdemic <john.demic@gmail.com> wrote:
>
>
> Thanks for the pointer Musachy.  I compared the html of both and it seems
> like the following was missing with the jsp  displayed in the tabbedPanel:
>
> <script src="/ood/struts/validationClient.js"></script>
> <script src="/ood/dwr/interface/validator.js"></script>
> <script src="/ood/dwr/engine.js"></script>
> <script src="/ood/struts/ajax/validation.js"></script>
> <script src="/ood/struts/xhtml/validation.js"></script>
>
> I manually added these to our header.jsp and I can now see struts sending
> the validation request to dwr.  The validation messages are not displaying
> however.  From FB, the result from DWR looks like this:
>
> var s0={};var s1=[];s0.actionErrors=s1;
> var s2=[];s0.actionMessages=s2;var s3={};s0.fieldErrors=s3;
> DWREngine._handleResponse('8173_1179871602745', s0);
>
> Which seems to indicate there is an action error in there.  This is
> occurring when the action is executed within and outside of the
> tabbedPanel.
> Any idea what i need to do to get these to display?  Additionally, how bad
> of an idea is it to globally/manually include those scripts?
>
>
>
>
> Musachy Barroso wrote:
> >
> > I don't see the tabPanel, assuming this is the jsp without it. Compare
> the
> > generated html with/without the tabPanel, there should be a validation
> > function in both.
> >
> > musachy
> >
> > On 5/22/07, jdemic <john.demic@gmail.com> wrote:
> >>
> >>
> >> Hey All,
> >>
> >> I'm attempting to perform ajax validation in a tabbedPanel and I'm
> >> getting
> >> the following JS error:
> >>
> >> validate is not defined
> >>
> >> The validation works fine outside of the tabbedPanel.   My jsp looks
> like
> >> this, any help is appreciated:
> >>
> >> <%@ taglib prefix="s" uri="/struts-tags" %>
> >>
> >> <head>
> >>     <s:head theme="ajax" debug="true"/>
> >> </head>
> >>
> >> <body>
> >> <s:form name="password_form" action="accountSettings!save.action"
> >> method="POST" theme="ajax" validate="true" >
> >>     <s:password label="Password" name="password1" />
> >>     <s:fielderror/>
> >>     <s:password label="Password (Again)" name="password2"/>
> >>    <s:submit theme="ajax" targets="wrap"/>
> >> </s:form>
> >> </body>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/TabbedPanel-and-Ajax-Validation-tf3800156.html#a10751497
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/TabbedPanel-and-Ajax-Validation-tf3800156.html#a10753729
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message