Bump, I guess. Has anyone else run into a problem like I've been
seeing using code similar to below? Am I doing something wrong?
Thanks,
Kevin
On Jul 17, 2005, at 11:59 AM, Kevin Menard wrote:
On Jul 17, 2005, at 11:26 AM, Howard Lewis Ship wrote:
I haven't seen this and I can't explain why you would. The code is
cut and dried and little changes from 3.0. Are you using abstract
properties? Are any persistent? Are you loading in the same request
or a later one?
I suppose it would be best just to show the relevant code. It is
for a login page / callback:
public abstract class Login extends ApplicationPage
{
private ICallback callback = null;
public void setCallback(final ICallback callback)
{
this.callback = callback;
}
}
public abstract class SecureApplicationPage extends ApplicationPage
implements PageValidateListener
{
public void pageValidate(final PageEvent event)
{
final Visit visit = (Visit) getVisit();
// If a user is logged-in, there's nothing to do.
if (visit.isLoggedIn())
{
return;
}
// Otherwise, redirect the user to the Login page so he can
login.
final IRequestCycle cycle = getRequestCycle();
final Login login = (Login) cycle.getPage("store/Login");
login.setCallback(new PageCallback(this));
throw new PageRedirectException(login);
}
}
Stepping through with a debugger, I can see that the callback field
is getting set with a valid value. When the login page loads
however, the callback is set to null. It seems pretty
straightforward, but maybe I'm doing something wrong . . .
--
Kevin
---------------------------------------------------------------------
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]