What happens when it can't show the message? Do you see a javascript error
message in the javascript console or does something "seem" to happen but
nothing does?

Does the form actually submit? Could it be this is a localization type of
error? Have you seen the new client side validation user guide page? There
are a couple CSS classes you ~must~ define yourself to see some things.
http://tapestry.apache.org/tapestry4.1/UsersGuide/clientside-validation.html

Does the dialog show up for you, just seemingly without any error message in
it?

On 7/26/06, Jun Tsai <[EMAIL PROTECTED]> wrote:

When I delete the focus binding,tapestry can produce some script.But When
I
submit the form,tapestry can't show the script message.

  <component type="Form" id="AForm">
    <binding value="ognl:beans.delegate" name="delegate"/>
    <binding value="ognl:true" name="clientValidationEnabled"/>
    <binding value="listener:doSaveEntityAction" name="success"/>
    <binding value="listener:doCancelEntityAction" name="cancel"/>
  </component>
  <component type="TextField" id="nameField">
    <binding value="message:name" name="displayName"/>
    <binding value="translator:string" name="translator"/>
    <binding value="ognl:entity.name" name="value"/>
    <binding name="validators" value="validators:required"/>
  </component>

The  html produced is

<script type="text/javascript"><!--
dojo.event.connect(window, 'onload', function(e) {
dojo.require("tapestry.form");tapestry.form.registerForm('AForm');
tapestry.form.focusField('nameField');
tapestry.form.clearProfiles('AForm');
tapestry.form.registerProfile
('AForm',{"required":"nameField","nameField":{"required":"请输入[NAME]的内容。"}});
});
// --></script>




2006/7/27, Jesse Kuhnert <[EMAIL PROTECTED]>:
>
> Nothing much...I think there "may" have been a bug that caused the
method
> rendering a form to return if focus was disabled, with the only problem
> being that the javascript registration was done towards the end of the
> method.
>
> If this was in fact a "bug" it might be fixed in a few more minutes when
> maven finishes covering my tracks ;)
>
> On 7/26/06, Jun Tsai <[EMAIL PROTECTED]> wrote:
> >
> > hi,all
> >     <component type="Form" id="AForm">
> >     <binding value="ognl:beans.delegate" name="delegate"/>
> >     <binding value="ognl:true" name="clientValidationEnabled"/>
> >     <binding value="listener:doSaveEntityAction" name="success"/>
> >     <binding value="listener:doCancelEntityAction" name="cancel"/>
> >     <binding value="ognl:false" name="focus"/>
> >   </component>
> >   <component type="TextField" id="nameField">
> >     <binding value="message:name" name="displayName"/>
> >     <binding value="translator:string" name="translator"/>
> >     <binding value="ognl:entity.name" name="value"/>
> >     <binding name="validators" value="validators:required"/>
> >   </component>
> >
> > When I click the submit form ,it doesn't work.I view the html
> source.Ifind
> > no validation script produced。
> >
> > <script type="text/javascript"><!--
> > dojo.event.connect(window, 'onload', function(e) {
> > dojo.require("tapestry.form");tapestry.form.registerForm('AForm');
> > });
> > // --></script>
> >
> >
> >
> > What's wrong ?
> >
> > Thanks.
> >
> > --
> > Welcome to China Java Users Group(CNJUG).
> > http://cnjug.dev.java.net
> >
>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>


--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to