You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "C. Adams" <li...@the-adams-family.net> on 2007/02/21 16:42:24 UTC
client side validation on included form
I have a form that I access via an action on an ajax-ish page. (Form and
results are on same page) It's working great, but I can't figure out the
validation.
The page looks like this now:
<s:div theme="ajax" href="PersonByAge_input.action" executeScripts="true" />
<s:div id="resultBox" theme="ajax" />
with the form looking like this:
<s:form action="PersonByAge" theme="css_xhtml" validate="true">
Between<br/>
<s:textfield name="startYear" label="Years" labelposition="top" />
<br clear="left"/>and<br/>
<s:textfield name="endYear" label="Years" labelposition="top" />
<br clear="left"/>
<s:submit value="Find People" theme="ajax" targets="resultBox"/>
</s:form>
With validation false, it works great.
With validation true, I get an error "ReferenceError:
validateForm_PersonByAge is not defined" and when I look in the generated
source, there are no javascript validation methods in the source.
but if I access the PersonByAge_input.action directly, the validation
methods are there in the source.
Have I hit a "not quite ready" area of the ajax theme?
Thanks.
Re: client side validation on included form
Posted by Musachy Barroso <mu...@gmail.com>.
Can you log a Jira ticket with the request?
thanks
musachy
On 2/22/07, C. Adams <li...@the-adams-family.net> wrote:
>
> I have found a solution to this. The good news is it is a simple
> pass-through to the dojo contentpane.
>
> changing this:
>
> <s:div theme="ajax" href="PersonByAge_input.action" executeScripts="true"
> />
>
>
> to this:
>
> <div dojoType="ContentPane" href="<s:url action="PersonByAge_input"
> />" scriptSeparation="false" executeScripts="true" ></div>
>
> fixes the issue. Could the developers add a passthrough to the dojo
> scriptSeparation property?
>
>
> On 2/21/07, C. Adams <li...@the-adams-family.net> wrote:
> >
> > I have a form that I access via an action on an ajax-ish page. (Form and
> > results are on same page) It's working great, but I can't figure out the
> > validation.
> >
> > The page looks like this now:
> >
> > <s:div theme="ajax" href="PersonByAge_input.action"
> executeScripts="true"
> > />
> > <s:div id="resultBox" theme="ajax" />
> >
> > with the form looking like this:
> >
> > <s:form action="PersonByAge" theme="css_xhtml" validate="true">
> > Between<br/>
> > <s:textfield name="startYear" label="Years"
> labelposition="top" />
> > <br clear="left"/>and<br/>
> > <s:textfield name="endYear" label="Years" labelposition="top" />
> > <br clear="left"/>
> > <s:submit value="Find People" theme="ajax" targets="resultBox"/>
> > </s:form>
> >
> >
> > With validation false, it works great.
> >
> > With validation true, I get an error "ReferenceError:
> > validateForm_PersonByAge is not defined" and when I look in the
> generated
> > source, there are no javascript validation methods in the source.
> >
> > but if I access the PersonByAge_input.action directly, the validation
> > methods are there in the source.
> >
> > Have I hit a "not quite ready" area of the ajax theme?
> >
> > Thanks.
> >
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
Re: client side validation on included form
Posted by "C. Adams" <li...@the-adams-family.net>.
I have found a solution to this. The good news is it is a simple
pass-through to the dojo contentpane.
changing this:
<s:div theme="ajax" href="PersonByAge_input.action" executeScripts="true" />
to this:
<div dojoType="ContentPane" href="<s:url action="PersonByAge_input"
/>" scriptSeparation="false" executeScripts="true" ></div>
fixes the issue. Could the developers add a passthrough to the dojo
scriptSeparation property?
On 2/21/07, C. Adams <li...@the-adams-family.net> wrote:
>
> I have a form that I access via an action on an ajax-ish page. (Form and
> results are on same page) It's working great, but I can't figure out the
> validation.
>
> The page looks like this now:
>
> <s:div theme="ajax" href="PersonByAge_input.action" executeScripts="true"
> />
> <s:div id="resultBox" theme="ajax" />
>
> with the form looking like this:
>
> <s:form action="PersonByAge" theme="css_xhtml" validate="true">
> Between<br/>
> <s:textfield name="startYear" label="Years" labelposition="top" />
> <br clear="left"/>and<br/>
> <s:textfield name="endYear" label="Years" labelposition="top" />
> <br clear="left"/>
> <s:submit value="Find People" theme="ajax" targets="resultBox"/>
> </s:form>
>
>
> With validation false, it works great.
>
> With validation true, I get an error "ReferenceError:
> validateForm_PersonByAge is not defined" and when I look in the generated
> source, there are no javascript validation methods in the source.
>
> but if I access the PersonByAge_input.action directly, the validation
> methods are there in the source.
>
> Have I hit a "not quite ready" area of the ajax theme?
>
> Thanks.
>