1 15 package org.apache.tapestry.vlib; 16 17 import org.apache.tapestry.PageRedirectException; 18 import org.apache.tapestry.event.PageEvent; 19 import org.apache.tapestry.event.PageValidateListener; 20 import org.apache.tapestry.vlib.pages.Login; 21 22 32 33 public abstract class ActivatePage extends Protected implements IActivate, PageValidateListener 34 { 35 public void pageValidate(PageEvent event) 36 { 37 Visit visit = (Visit) getVisit(); 38 39 if (visit != null && visit.isUserLoggedIn()) 40 return; 41 42 44 Login login = (Login) getRequestCycle().getPage("Login"); 45 46 login.setCallback(new ActivateCallback(this)); 47 48 throw new PageRedirectException(login); 49 } 50 } 51 | Popular Tags |