You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vjeran Marcinko <vj...@tis.hr> on 2005/03/29 10:24:53 UTC

Difficulties with DirectLink and PageValidateListener

Hi.

Anyone had annoyances because PageValidateListener isn't called after
DirectLinks listener method *doesn't* activate new page, but stays on the
same? Thing is that it's possible for DirectLink listener to change some
validation state during it's execution, but since PageValidateListener isn't
processed since activate(pageName) hasn't been called, page is rendered
nevertheless, without validating before?

Common such situation is LogOut listener action, which usually clears
session state, and doesn't have to activate new page, but stays on the same
"secured" page, which is now not supose to render after this action, because
it's validation shouldn't pass anymore..

-Vjeran



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27.3.2005


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Difficulties with DirectLink and PageValidateListener

Posted by Vjeran Marcinko <vj...@tis.hr>.
----- Original Message ----- 
From: "Kent Tong" <ke...@cpttm.org.mo>
To: <ta...@jakarta.apache.org>
Sent: Wednesday, March 30, 2005 9:53 AM
Subject: Re: Difficulties with DirectLink and PageValidateListener


> Vjeran Marcinko <vjeran <at> tis.hr> writes:
> > but from
> > validate() method of that same secured page, because it does redirecting
if
> > there's no mentioned session flag. But since validate() isn't called
> > anymore, redirection doesn't happen.
>
> If you insist on validating it again, you can try activating
> the existing page explicitly in the listener.
>
> void myListener(...) {
>   ...
>   cycle.activate(getPageName());
> }

Yes, that's the way I'm practicing now... Actually, workaround for this
problem is easy as seen, but it's just that it's not supose to be that
way... My action listener is supose to be only about clearing session flag,
and validate() resposibility would be to take apropriate actions regarding
this session flag (redirecting to LoginPage).....
Yeah, whatever...there are much greater problems out there ;)

-Vjeran



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27.3.2005


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Difficulties with DirectLink and PageValidateListener

Posted by Kent Tong <ke...@cpttm.org.mo>.
Vjeran Marcinko <vjeran <at> tis.hr> writes:
> It should be redirected to LoginPage, but not from this DirectLink's logout
> listnener method, because it is only there to clear session flag, 

What problem would you have if you activated the LoginPage
as the last step in the listener?

> but from
> validate() method of that same secured page, because it does redirecting if
> there's no mentioned session flag. But since validate() isn't called
> anymore, redirection doesn't happen.

If you insist on validating it again, you can try activating
the existing page explicitly in the listener.

void myListener(...) {
  ...
  cycle.activate(getPageName());
}



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Difficulties with DirectLink and PageValidateListener

Posted by Vjeran Marcinko <vj...@tis.hr>.
----- Original Message ----- 
From: "Kent Tong" <ke...@cpttm.org.mo>
To: <ta...@jakarta.apache.org>
Sent: Wednesday, March 30, 2005 3:31 AM
Subject: Re: Difficulties with DirectLink and PageValidateListener


> Vjeran Marcinko <vjeran <at> tis.hr> writes:
>
> > Common such situation is LogOut listener action, which usually clears
> > session state, and doesn't have to activate new page, but stays on the
same
> > "secured" page, which is now not supose to render after this action,
because
> > it's validation shouldn't pass anymore..
>
> I am not getting what you're saying. You say it should "stays
> on the same secured page", but then you also say it "is not
> not supposed to render". So, actually what would you like
> to display after logging him out?

It should be redirected to LoginPage, but not from this DirectLink's logout
listnener method, because it is only there to clear session flag, but from
validate() method of that same secured page, because it does redirecting if
there's no mentioned session flag. But since validate() isn't called
anymore, redirection doesn't happen.

-Vjeran



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27.3.2005


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Difficulties with DirectLink and PageValidateListener

Posted by Kent Tong <ke...@cpttm.org.mo>.
Vjeran Marcinko <vjeran <at> tis.hr> writes:

> Common such situation is LogOut listener action, which usually clears
> session state, and doesn't have to activate new page, but stays on the same
> "secured" page, which is now not supose to render after this action, because
> it's validation shouldn't pass anymore..

I am not getting what you're saying. You say it should "stays 
on the same secured page", but then you also say it "is not
not supposed to render". So, actually what would you like
to display after logging him out?



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org