Yes Niclas,
that sounds great, ContentSource being a Page, Panels etc?

Then, would it be a good addition to be able to register your own
MySpecialEnhancedWebSession in PaxWicket, since that is the way Wicket
folks recommends to store custom data in the session?

/peter

On 2/7/07, Niclas Hedhman <[EMAIL PROTECTED]> wrote:
>
> 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
>
>

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to