I am using tapestry4.1.If I return null It is showing the same page with field decoration(the user name text field is being decorated with red color) but the error messages(for example "Your user id is invalid") are not being displayed any where on the page. So what I have to do in order to display the messages on the page. Thanking you in advance.
Warm regards, Muralidhar Y [EMAIL 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. ________________________________ -----Original Message----- From: Andreas Andreou [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2008 4:32 PM To: Tapestry users Subject: Re: problem custom validation You still have to return the page to be rendered even in case your validation fails.... So, just add return null after validationDelegate.record(formComp, "Invalid password"); On Mon, Nov 10, 2008 at 11:52 AM, Muralidhar Y <[EMAIL PROTECTED]> wrote: > Hi friends, > > > > I have done the following in the html form > > > > <form jwcid="[EMAIL PROTECTED]" success="listener:onWordSubmit" > 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 > > [EMAIL 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. > > > > _____ > > > > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
