Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

problem custom validation

Muralidhar Y

2008-11-10

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi friends,



I have done the following in the html form



<form jwcid="homeForm@(protected)"
delegate="bean:mydelegate">





I have included the bean in the page specification like the following



<page-specification class="com.kensium.tapestry.first.Home">



   <bean name="mydelegate" class="com.tapestry.core.FPSDeligate" />





</page-specification>



In the listener method I have coded as following:-



         public String onWordSubmit(IRequestCycle cycle) {      

         if(getUserName().equals("murali")){

             getVisit().setAttribute("org.fps.companyName", "Kensium
solutions");

         }else{

             Form currentForm=(Form)getComponent("homeForm");

             IValidationDelegate
validationDelegate=(IValidationDelegate)currentForm.getDelegate();

             IFormComponent
formComp=(IFormComponent)getComponent("userName");

             validationDelegate.record(formComp, "Invalid
password");

         }

     

        return "Secret";

            }



Actually when the error is recorded it has to stay on the same page but it
is moving to the next page without showing errors on the current page. Do I
have to do anything in the html template?



Thanking you.





Warm regards,

Muralidhar Y

muralidhary@(protected)



US Main: 877 KENSIUM (536.7486)
India Main: +91 9949495511

India Fax:  +91 9949495522

Kensium

200 S Wacker Dr, Suite 3100

Chicago, IL 60606





Confidentiality Note:
-----------------------------
The information contained in this e-mail is strictly confidential and for
the intended use of the addressee only. Any disclosure, use or copying of
the information by anyone other than the intended recipient is prohibited.
If you have received this message in error, please notify the sender
immediately by return e-mail and securely discard this message.



_____



©2008 gg3721.com - Jax Systems, LLC, U.S.A.