The problem is that the wicket-auth-roles package assumes you subclass AuthenticatedWebApplication as your application class. If you want to reuse that, you'll have to subclass the AuthenticatedWebApplication and the AuthenticatedSession.

No spring can fix that.

Martijn

On 6/8/06, Mark Derricutt <[EMAIL PROTECTED]> wrote:
On 6/7/06, Martijn Dashorst <[EMAIL PROTECTED] > wrote:

I suggest (tried and tested at my company) to use the Auth application as your base class and merge the spring related stuff into your subclass. The spring integration is agnostic for sessions and such, so you'll be up and running much quicker.

Personally I'm using the wicket.spring.SpringWebApplicationFactory mentioned in web.xml then and nice and cleanly inject my authentication strategy into my Application via normal spring IoC:

    <bean id="wicketApplication" class="com.theoryinpractice.timetrackr.TimeTrackrApplication">
        <property name="timeTrackrAuthorizationStrategy" ref="authorizationStrategy"/>
    </bean>

    <bean id="authorizationStrategy" class="com.theoryinpractice.timetrackr.TimeTrackrAuthorizationStrategy">
        <property name="userManager" ref="userManager"/>
    </bean>

The authorization strategy also has injected into it my hibernate DAO's so have full access to everything they need, cleanly and springy, without touching any of those odd little convience classes (actually I never knew they existed either).

Doing spring+wicket this way is much much nicer I find.



_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!
-- http://wicketframework.org
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to