On request from Peter, I have inched Pax Wicket a bit closer to supporting
authenticated sessions.
PaxWicketAuthentication is an interface from which we will access
authentication.
Something like this (i18n ignored);
public class SomeContentSource extends AbstractContentSource
{
protected Panel createComponent( String contentId, Panel parent )
{
PaxWicketAuthentication auth = getAuthentication();
Roles roles = auth.getRoles();
if( roles.hasRole( MyRoles.MEMBER ) )
{
String username = auth.getLoggedInUser();
return new MemberPanel( username, memberData );
}
else
{
return new GuestPanel( "guest", dummyData );
}
}
}
Cheers
Niclas
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general