Okay..so i'm using AjaxForm and I'd like to have a form errors (if there are any) shown above the form when the request comes back.

I'm used to tracking errors as specified in Kent Tong's tapestry 4 book.

trying out Tong's error tracking with AjaxForm, I get this error:

Error converting value for template parameter delegate: No type converter for type org.apache.tapestry.valid.IValidationDelegate is available.

What's the *right* way to handle server-side validation?

I'm set up with the following:

/////////////////////////////////HTML:

               <span style="color:red">
                   <ul>
                       <span jwcid="errors">
<li jwcid="@If" element="literal:li" condition="ognl:currentFieldTracking.inError"><span jwcid="error" /></li>
                       </span>
                   </ul>
               </span>
               <form
               jwcid="[EMAIL PROTECTED]:AjaxForm"
               listener="listener:onEmail"
               updateComponents="ognl:{'errors'}"
               delegate="beans.delegate"
>

               ....my form stuff here...

           <input type="submit" jwcid="[EMAIL PROTECTED]:AjaxSubmit" />

            </form>




//////////////////////////////////SPEC:

<page-specification>
   <property name="currentFieldTracking" />
<component id="errors" type="For">
       <binding name="source" value="beans.delegate.fieldTracking" />
       <binding name="value" value="currentFieldTracking" />
   </component>
   <component id="error" type="Delegator">
       <binding name="delegate"
           value="currentFieldTracking.errorRenderer" />
   </component>
</page-specification>


//////////////////////////////////JAVA:

   ...

   @Bean
   public abstract ValidationDelegate getDelegate();

   ....

   public void onEmail(){

      ....

   }


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to