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]