You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Weisu <we...@gmail.com> on 2007/03/16 00:42:33 UTC
T5-PageValidateListener & ASO exists method @InjectStateFlag
Hi, I cannot find this in T5, I am try to have a login page before other
pages, I was doing this inT4:
public void pageValidate(PageEvent event) {
if (!getClientSessionExists()) {
Login login = getLogin();
login.setNextPage("InvoiceApproval");
throw new PageRedirectException(login);
}
}
Another question: In T4, it has a nice exists method for ASO to check the
state of ASO, uses @InjectStateFlag, how can i do this in T5?
Thanks.
--
View this message in context: http://www.nabble.com/T5-PageValidateListener---ASO-exists-method-%40InjectStateFlag-tf3411692.html#a9505875
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5-PageValidateListener & ASO exists method @InjectStateFlag
Posted by Howard Lewis Ship <hl...@gmail.com>.
PageValidateListener is now handled using the activate event, i.e.,
onActivate().
There is not yet an equivalent to the @InjectStateFlag.
Here's an idea; how about if the ApplicationStateWorker (the code that
handles the @ApplicationState annotation) looks for a "companion"
field (with "Exists" tacked on) of type boolean. If it exists, it will
be used to determine if the main ASO exists. Convention over
configuration, baby!
@ApplicationState
private MyAso _myAso;
private boolean _myAsoExists;
On 3/15/07, Weisu <we...@gmail.com> wrote:
>
> Hi, I cannot find this in T5, I am try to have a login page before other
> pages, I was doing this inT4:
> public void pageValidate(PageEvent event) {
> if (!getClientSessionExists()) {
> Login login = getLogin();
> login.setNextPage("InvoiceApproval");
> throw new PageRedirectException(login);
> }
> }
> Another question: In T4, it has a nice exists method for ASO to check the
> state of ASO, uses @InjectStateFlag, how can i do this in T5?
> Thanks.
> --
> View this message in context: http://www.nabble.com/T5-PageValidateListener---ASO-exists-method-%40InjectStateFlag-tf3411692.html#a9505875
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org