Make sure you hook into the After Phase method on RESTORE_VIEW otherwise the adf context will not have been initialized.
public void afterPhase(PhaseEvent phaseEvent) {
System.out.println("___________________________________ -after phase is logged in " + isLoggedIn());
}
private boolean isLoggedIn() {
if (ADFContext.getCurrent() == null || ADFContext.getCurrent().getSecurityContext() == null ||
ADFContext.getCurrent().getSecurityContext().getUserName() == null || ANONYMOUS_USERNAME.equalsIgnoreCase(ADFContext.getCurrent().getSecurityContext().getUserName()))
{
return false;
}
ADFContext.getCurrent().getSecurityContext().getUserName());
return true;
}
public void afterPhase(PhaseEvent phaseEvent) {
System.out.println("___________________________________ -after phase is logged in " + isLoggedIn());
}
private boolean isLoggedIn() {
if (ADFContext.getCurrent() == null || ADFContext.getCurrent().getSecurityContext() == null ||
ADFContext.getCurrent().getSecurityContext().getUserName() == null || ANONYMOUS_USERNAME.equalsIgnoreCase(ADFContext.getCurrent().getSecurityContext().getUserName()))
{
return false;
}
ADFContext.getCurrent().getSecurityContext().getUserName());
return true;
}
Comments
Post a Comment