Step 08
Base (super) page class for pages which require checking whether user has logged in or not.
package org.example.TSA.pages.spages;
import org.apache.tapestry.annotations.ApplicationState;
import org.example.TSA.value.SessionData;
public abstract class LoginProtected {
@ApplicationState
private SessionData _session;
Object onActivate() {
if(!_session.isSessionExists()){
return "Login";
}
return null;
}
/**
* @return the _session
*/
public SessionData get_session() {
return _session;
}
}
20 September 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment