I'm probably going to sleep now. I hope everyone feels very free to post questions/issues related to 4.1 (or any tapestry release, but esp 4.1) to the list. Even if you feel dumb asking it, some of the things might very well be straightforward, but the more I know about what slows people down and makes things less obvious the more I'll be able to do behind the scenes to make the framework behave more how people expect. (Or change something so they expect something different ;) )
On 7/27/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
P.S. Depending on which javascript function you feel like taking a peak at, you can pretty much take any function listed here: http://tapestry.apache.org/tapestry4.1/javascript/form-validation.html And figure out what is getting passed to it with a statement like so: dojo.event.connect(tapestry.form.validation, "summarizeErrors", function(form, results, profile) { dojo.debugShallow (results); dojo.debugShallow(profile); }); Notice that you can have your own AOP style function recieve the same parameters passed into the original. The "dojo.debugShallow" function is a little utility helper function that will iterate over all of your objects properties and print out their string value. (only goes 1 level deep, I think there is also a dojo.debugDeep but I don't normally use it) On 7/27/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > > 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.ButWhen 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. > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
-- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.