You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alex2222 <ma...@tapestryforums.com> on 2006/01/03 09:55:24 UTC
Setting a abstract variable does not work
Hi!
I am using Tapestry 4.0 with Spring 1.2.6 an got a problem with my Login procedure. I want to redirect my user after logging in to the previous requested, protected page. My protected pages are inherited from a ProtectedPage with a PageValidateListener:
-----
public void pageValidate(PageEvent event) {
Login login = (Login) getRequestCycle().getPage("Login");
login.setCallback(new PageCallback(this));
throw new PageRedirectException(login);
}
-----
Login.java:
-----
public abstract void setCallback(ICallback value);
public abstract ICallback getCallback();
public void onLogin() {
log.debug("callback:"+ getCallback());
}
-----
The logfile says "callback: null", but if I call login.getCallback from the listener method it has a value. How do I say Tapestry/Spring to persist my Callback? Is there another way to solve this problem?
Alex.
-------------------- m2f --------------------
Sent from www.TapestryForums.com
Read this topic online here: <<topic_link>>
http://www.tapestryforums.com/viewtopic.php?p=12592#12592
-------------------- m2f --------------------
Re: Setting a abstract variable does not work
Posted by Kent Tong <ke...@cpttm.org.mo>.
Alex2222 <maillist <at> tapestryforums.com> writes:
> public abstract void setCallback(ICallback value);
> public abstract ICallback getCallback();
> public void onLogin() {
> log.debug("callback:"+ getCallback());
> }
>
> The logfile says "callback: null", but if I call login.getCallback from the
> listener method it has a value.
> How do I say Tapestry/Spring to persist my Callback? Is there another way to
> solve this problem?
Are you sure you have mark the callback property as persistent?
--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org