You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk> on 2007/12/21 19:03:35 UTC

Wickettester and session?

Hi

There seems to be a problem with wicket tester and the session created 
(I use my own custom session). I create the wicket tester like this:

        final ApplicationContext context = new 
ClassPathXmlApplicationContext(
                "applicationContext.xml");
        IDBDao base = (IDBDao) context.getBean("dBDao");
        dbProvider = base;
        base.generateDummyData();
        // 2. setup mock injection environment
        AnnotApplicationContextMock appctx = new 
AnnotApplicationContextMock();
        appctx.putBean("dBDao", dbProvider);

        wicketTester = new WicketTester(ZeuzGroupApplication.class);
       
        WebApplication app = wicketTester.getApplication();

        app.addComponentInstantiationListener(new 
SpringComponentInjector(app,
                appctx));

The application works fine without testing. But I get a class cast 
exception when testing, since the session arent my custom one, heres how 
I instantiate new sessions in my webapplication:

    @Override
    public Session newSession(Request request, Response response) {
        ZeuzSession zeuzSession = new ZeuzSession(this, request);
        return zeuzSession;
    }

-regards Nino

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Here it is,

https://issues.apache.org/jira/browse/WICKET-1256

Thanks for reminding me.

Eelco Hillenius wrote:
> On Jan 2, 2008 2:28 PM, Nino Saturnino Martinez Vazquez Wael
> <ni...@jayway.dk> wrote:
>   
>> Bump on this one..
>>     
>
> If no-one is reacting, you can best open a JIRA issue for it. It helps
> to have a test case that proves the issue attached to it.
>
> Cheers,
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>   

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Eelco Hillenius <ee...@gmail.com>.
On Jan 2, 2008 2:28 PM, Nino Saturnino Martinez Vazquez Wael
<ni...@jayway.dk> wrote:
> Bump on this one..

If no-one is reacting, you can best open a JIRA issue for it. It helps
to have a test case that proves the issue attached to it.

Cheers,

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Bump on this one..

Nino Saturnino Martinez Vazquez Wael wrote:
> Hi
>
> There seems to be a problem with wicket tester and the session created 
> (I use my own custom session). I create the wicket tester like this:
>
>        final ApplicationContext context = new 
> ClassPathXmlApplicationContext(
>                "applicationContext.xml");
>        IDBDao base = (IDBDao) context.getBean("dBDao");
>        dbProvider = base;
>        base.generateDummyData();
>        // 2. setup mock injection environment
>        AnnotApplicationContextMock appctx = new 
> AnnotApplicationContextMock();
>        appctx.putBean("dBDao", dbProvider);
>
>        wicketTester = new WicketTester(ZeuzGroupApplication.class);
>              WebApplication app = wicketTester.getApplication();
>
>        app.addComponentInstantiationListener(new 
> SpringComponentInjector(app,
>                appctx));
>
> The application works fine without testing. But I get a class cast 
> exception when testing, since the session arent my custom one, heres 
> how I instantiate new sessions in my webapplication:
>
>    @Override
>    public Session newSession(Request request, Response response) {
>        ZeuzSession zeuzSession = new ZeuzSession(this, request);
>        return zeuzSession;
>    }
>
> -regards Nino
>

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How does wicket support conditional markup display?

Posted by Igor Vaynberg <ig...@gmail.com>.
you would put the message inside webmarkupcontainer and override its
isvisible so it only returns true when there are no items in the list

-igor


On Jan 4, 2008 10:44 AM, Zheng, Xiahong <Xi...@fmr.com> wrote:
> I have a page that normally display a list of items retrieved from some
> external source. The markup page will be <table> based in this case.
> However, when the list returned is empty, I want to display some error
> message using different markup.
>
> Is there a wicket component or tag I can use for this purpose?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


How does wicket support conditional markup display?

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
I have a page that normally display a list of items retrieved from some
external source. The markup page will be <table> based in this case.
However, when the list returned is empty, I want to display some error
message using different markup. 

Is there a wicket component or tag I can use for this purpose?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: pageContext.getErrorData()?

Posted by Igor Vaynberg <ig...@gmail.com>.
create your own subclass of requestcycle and override
onruntimeexception like i said. that is the best place.

-igor


On Jan 8, 2008 10:39 AM, Hoover, William <wh...@nemours.org> wrote:
> I need to create a catch all error page that makes use of http status codes as well as any exceptions that may have been thrown. Where would I retrieve this data?
>
> BTW, thanks your assistance!
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
>
> Sent: Tuesday, January 08, 2008 1:12 PM
> To: users@wicket.apache.org
> Subject: Re: pageContext.getErrorData()?
>
>
> iterator<feedbackmessage> i=feedbackmessages.iterator();
> while (i.hasnext()) {
>   feedbackmessage m=i.next();
>   m.getlevel()<== error/info/warn
>   m.getmessage()<== error message
> }
>
> if you want to intercept an exception then override
> requestcycle.onruntimeexception(runtimeexception e)
>
> -igor
>
>
> On Jan 8, 2008 10:07 AM, Hoover, William <wh...@nemours.org> wrote:
> > I didn't see any methods in FeedbackMessages for:
> >
> > pageContext.getErrorData().getStatusCode();
> > pageContext.getErrorData().getThrowable();
> > ...
> >
> > Am I missing something?
> >
> >
> > -----Original Message-----
> > From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> > Sent: Tuesday, January 08, 2008 12:43 PM
> > To: users@wicket.apache.org
> > Subject: Re: pageContext.getErrorData()?
> >
> >
> > see session.getfeedbackmessages()
> >
> > -igor
> >
> >
> > On Jan 8, 2008 8:34 AM, William Hoover <wh...@nemours.org> wrote:
> > > Is there a wicket equivalent to pageContext.getErrorData()?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: pageContext.getErrorData()?

Posted by "Hoover, William " <wh...@nemours.org>.
I need to create a catch all error page that makes use of http status codes as well as any exceptions that may have been thrown. Where would I retrieve this data?

BTW, thanks your assistance!

-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
Sent: Tuesday, January 08, 2008 1:12 PM
To: users@wicket.apache.org
Subject: Re: pageContext.getErrorData()?


iterator<feedbackmessage> i=feedbackmessages.iterator();
while (i.hasnext()) {
  feedbackmessage m=i.next();
  m.getlevel()<== error/info/warn
  m.getmessage()<== error message
}

if you want to intercept an exception then override
requestcycle.onruntimeexception(runtimeexception e)

-igor


On Jan 8, 2008 10:07 AM, Hoover, William <wh...@nemours.org> wrote:
> I didn't see any methods in FeedbackMessages for:
>
> pageContext.getErrorData().getStatusCode();
> pageContext.getErrorData().getThrowable();
> ...
>
> Am I missing something?
>
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> Sent: Tuesday, January 08, 2008 12:43 PM
> To: users@wicket.apache.org
> Subject: Re: pageContext.getErrorData()?
>
>
> see session.getfeedbackmessages()
>
> -igor
>
>
> On Jan 8, 2008 8:34 AM, William Hoover <wh...@nemours.org> wrote:
> > Is there a wicket equivalent to pageContext.getErrorData()?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: pageContext.getErrorData()?

Posted by Igor Vaynberg <ig...@gmail.com>.
iterator<feedbackmessage> i=feedbackmessages.iterator();
while (i.hasnext()) {
  feedbackmessage m=i.next();
  m.getlevel()<== error/info/warn
  m.getmessage()<== error message
}

if you want to intercept an exception then override
requestcycle.onruntimeexception(runtimeexception e)

-igor


On Jan 8, 2008 10:07 AM, Hoover, William <wh...@nemours.org> wrote:
> I didn't see any methods in FeedbackMessages for:
>
> pageContext.getErrorData().getStatusCode();
> pageContext.getErrorData().getThrowable();
> ...
>
> Am I missing something?
>
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> Sent: Tuesday, January 08, 2008 12:43 PM
> To: users@wicket.apache.org
> Subject: Re: pageContext.getErrorData()?
>
>
> see session.getfeedbackmessages()
>
> -igor
>
>
> On Jan 8, 2008 8:34 AM, William Hoover <wh...@nemours.org> wrote:
> > Is there a wicket equivalent to pageContext.getErrorData()?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: pageContext.getErrorData()?

Posted by "Hoover, William " <wh...@nemours.org>.
I didn't see any methods in FeedbackMessages for:

pageContext.getErrorData().getStatusCode();
pageContext.getErrorData().getThrowable();
...

Am I missing something?

-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
Sent: Tuesday, January 08, 2008 12:43 PM
To: users@wicket.apache.org
Subject: Re: pageContext.getErrorData()?


see session.getfeedbackmessages()

-igor


On Jan 8, 2008 8:34 AM, William Hoover <wh...@nemours.org> wrote:
> Is there a wicket equivalent to pageContext.getErrorData()?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: pageContext.getErrorData()?

Posted by Igor Vaynberg <ig...@gmail.com>.
see session.getfeedbackmessages()

-igor


On Jan 8, 2008 8:34 AM, William Hoover <wh...@nemours.org> wrote:
> Is there a wicket equivalent to pageContext.getErrorData()?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


pageContext.getErrorData()?

Posted by William Hoover <wh...@nemours.org>.
Is there a wicket equivalent to pageContext.getErrorData()?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-security] LDAP integration?

Posted by Maurice Marrink <ma...@gmail.com>.
No, only those you need.
Secure(web)Page is supposed to be a general purpose base class so it
has to provide all constructors, your class does not.

Maurice

On Jan 7, 2008 8:46 PM, William Hoover <wh...@nemours.org> wrote:
> One other question... Is it necessary to increase visibility of all the WebPage constructors (protected -> public) for SecureWebPage impls?
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
>
> Sent: Monday, January 07, 2008 2:24 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> My only worry about copying the onliners from Secure(Web)Page into MySecurePage is if they change. Every new wicket-security release we would have to check to make sure that nothing changed in Secure(Web)Page to prevent possible issues. I understand that the code is trivial and probably will not change significantly in the future, but the only true guarantee is only what is defined in the interface contract. I think a mount solution is worth further investigation. When I have time I will look into how to implement it (if possible). For now, I will live with the copy and paste and use your proposed solution. Thanks for your help! I will let you know how thinks turn out with ldap :o)
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Monday, January 07, 2008 11:06 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> Do you mean that little bit of insignificant code in the Secure(Web)Page ?
> All that does is redirect to the SecureComponentHelper so i would not
> call that code duplication.
> Even more all SecureComponents i create use the same oneliners to
> redirect to SecureComponentHelper.
>
> Regarding the mount, i am not sure if you can get the mount path if
> all you have is a page class (you probably can somehow but i don't
> know how)
> In that case you can extend SwarmStrategy and use the mount path to
> check for instantiation permission.
> But i would not recommend that just to avoid "code duplication", if it
> really bothers you you can go ahead with option 2 and use a custom
> interface for instantiation checking.
> Or you could try and ignore the fact that the login page should not be
> a SecurePage and try it anyway, i am not a 100% sure it will work but
> i did make some exceptions that bypass the instantiation check if the
> page class in question is the login page, so give it a try.
> The reason the documentation says you should not have your login page
> extend SecurePage is because it just doesn't feel right to do so.
>
> Maurice
>
> On Jan 7, 2008 3:24 PM, William Hoover <wh...@nemours.org> wrote:
> > oops!!!
> >
> > *definitely*
> >
> > -----Original Message-----
> > From: William Hoover
> > Sent: Monday, January 07, 2008 9:23 AM
> > To: 'users@wicket.apache.org'
> >
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > The only issue I have with proposed solution 1 is that there is duplication of code, but I cannot see a simple way around it. Is it plausible to adopt the same strategy that we mount pages? I was thinking that doing something like:
> >
> > mountSecurePage(MySecureWebPage.class)
> >
> > ...may be a nice alternative to actually extending SecureWebPage.
> >
> > I will defiantly contribute any ldap integration code once I am able to get it working properly ;o)
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Saturday, January 05, 2008 12:16 PM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > You could do LoginPage extends AbstractBasePage
> > MySecurePage extends AbstractBasePage implements ISecurePage
> > OtherPage extends MySecurePage
> >
> > Or alternatively
> > MyInterface extends ISecurePage
> > AbstractBasePage extends SecureWebPage
> > LoginPage extends AbstractBasePage
> > OtherPage extends AbstractBasePage implements MyInterface
> > The important part here is the MyInterface
> > By default Swarm only does an instantiation check on components with
> > the ISecurePage interface (which is implemented by SecureWebPage).
> > But you can change this to any interface you like as long as the
> > interface extends ISecureComponent.
> > To do this you need to overwrite the setupStrategyFactory method of
> > SwarmWebApplication to do
> > setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));
> >
> > Personally i would go for option 1 as you can simply copy the
> > implementation for ISecurePage from SecureWebPage
> >
> > BTW once you have the ldap part up and running and if it is setup in a
> > generic way i would be interested in including it with swarm or a
> > subproject if thats alright with you.
> >
> > Maurice
> >
> > On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> > > I do have another question...
> > >
> > > According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
> > >
> > > Example 1:
> > > AbstractBasePage extends SecureWebPage (wrapper)
> > >
> > > LoginPage extends AbstractBasePage (will not work)
> > > OtherPage1 extends AbstractBasePage
> > > OtherPage2 extends AbstractBasePage
> > > ...
> > >
> > > Example 2:
> > > AbstractBasePage extends WebPage (wrapper)
> > >
> > > LoginPage extends AbstractBasePage
> > > OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > > OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > > ...
> > >
> > > -----Original Message-----
> > > From: William Hoover [mailto:whoover@nemours.org]
> > >
> > > Sent: Friday, January 04, 2008 1:24 PM
> > > To: users@wicket.apache.org
> > > Subject: RE: [wicket-security] LDAP integration?
> > >
> > >
> > > Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
> > >
> > > -----Original Message-----
> > > From: William Hoover [mailto:whoover@nemours.org]
> > > Sent: Friday, January 04, 2008 1:14 PM
> > > To: users@wicket.apache.org
> > > Subject: RE: [wicket-security] LDAP integration?
> > >
> > >
> > > I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
> > >
> > >         public WaspSession(WaspApplication application, Request request)
> > >         {
> > >                 super(request);
> > >                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
> > >         }
> > >
> > > -----Original Message-----
> > > From: Maurice Marrink [mailto:marrink@gmail.com]
> > > Sent: Friday, January 04, 2008 11:16 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: [wicket-security] LDAP integration?
> > >
> > >
> > > I think there will be one more beta before we do the final.
> > > I recently made some changes to boost performance and a public beta
> > > for that will be better. Even though we are already using it in our
> > > apps without problems through the snapshot release.
> > > With any luck the 2nd beta will be released this weekend and the final
> > > will probably follow soon after.
> > >
> > > Well the slightly more complex route is connecting to ldap yourself
> > > (option number 1 in my previous mail).
> > > Personally i think the mapping between ldap and swarm will be a
> > > breeze. because a swarm principal is basically just a name.
> > >
> > > Maurice
> > >
> > > On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > > > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> > > >
> > > > Do you have a roadmap/timeline on a release date for wicket-security?
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Maurice Marrink [mailto:marrink@gmail.com]
> > > > Sent: Friday, January 04, 2008 8:36 AM
> > > > To: users@wicket.apache.org
> > > > Subject: Re: [wicket-security] LDAP integration?
> > > >
> > > >
> > > > Yes and not exactly.
> > > >
> > > > wicket-security is build with plugability in mind, meaning if it does
> > > > not yet exist you can build it yourself quite easily.
> > > > Regarding LDAP, i myself have never worked with it but there are a
> > > > couple of options you can try
> > > > -use swarm and map ldap permissions to swarm principals
> > > > -use swarm with acegi and let acegi handle the ldap part, you still
> > > > need to map acegi permissions to swarm principals though but it saves
> > > > you from having to do all the ldap connection stuff yourself
> > > > -use wasp and build your own ldap implementation, more work but also
> > > > more control
> > > >
> > > > As for the ldap example part, i am afraid you are somewhat on your own.
> > > > There is however an example showing how to integrate swarm with acegi
> > > > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > > > and there is an other example showing wicket-auth-roles acegi and ldap
> > > > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > > > So if you rip the ldap config from the last example and use it in the
> > > > first example instead of the TestingAuthenticationProvider you should
> > > > be ready to go
> > > > The example also has some suggestion on how you could do your own ldap
> > > > permission mapping if you choose to go that way.
> > > >
> > > > If you decide to go all out and build directly on wasp you should take
> > > > a look at swarm itself a a reference, just ignore all the stuff about
> > > > permissions, principals, subjects and stuff.
> > > >
> > > > Maurice
> > > >
> > > > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
One other question... Is it necessary to increase visibility of all the WebPage constructors (protected -> public) for SecureWebPage impls?

-----Original Message-----
From: William Hoover [mailto:whoover@nemours.org]
Sent: Monday, January 07, 2008 2:24 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


My only worry about copying the onliners from Secure(Web)Page into MySecurePage is if they change. Every new wicket-security release we would have to check to make sure that nothing changed in Secure(Web)Page to prevent possible issues. I understand that the code is trivial and probably will not change significantly in the future, but the only true guarantee is only what is defined in the interface contract. I think a mount solution is worth further investigation. When I have time I will look into how to implement it (if possible). For now, I will live with the copy and paste and use your proposed solution. Thanks for your help! I will let you know how thinks turn out with ldap :o) 

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Monday, January 07, 2008 11:06 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


Do you mean that little bit of insignificant code in the Secure(Web)Page ?
All that does is redirect to the SecureComponentHelper so i would not
call that code duplication.
Even more all SecureComponents i create use the same oneliners to
redirect to SecureComponentHelper.

Regarding the mount, i am not sure if you can get the mount path if
all you have is a page class (you probably can somehow but i don't
know how)
In that case you can extend SwarmStrategy and use the mount path to
check for instantiation permission.
But i would not recommend that just to avoid "code duplication", if it
really bothers you you can go ahead with option 2 and use a custom
interface for instantiation checking.
Or you could try and ignore the fact that the login page should not be
a SecurePage and try it anyway, i am not a 100% sure it will work but
i did make some exceptions that bypass the instantiation check if the
page class in question is the login page, so give it a try.
The reason the documentation says you should not have your login page
extend SecurePage is because it just doesn't feel right to do so.

Maurice

On Jan 7, 2008 3:24 PM, William Hoover <wh...@nemours.org> wrote:
> oops!!!
>
> *definitely*
>
> -----Original Message-----
> From: William Hoover
> Sent: Monday, January 07, 2008 9:23 AM
> To: 'users@wicket.apache.org'
>
> Subject: RE: [wicket-security] LDAP integration?
>
>
> The only issue I have with proposed solution 1 is that there is duplication of code, but I cannot see a simple way around it. Is it plausible to adopt the same strategy that we mount pages? I was thinking that doing something like:
>
> mountSecurePage(MySecureWebPage.class)
>
> ...may be a nice alternative to actually extending SecureWebPage.
>
> I will defiantly contribute any ldap integration code once I am able to get it working properly ;o)
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Saturday, January 05, 2008 12:16 PM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> You could do LoginPage extends AbstractBasePage
> MySecurePage extends AbstractBasePage implements ISecurePage
> OtherPage extends MySecurePage
>
> Or alternatively
> MyInterface extends ISecurePage
> AbstractBasePage extends SecureWebPage
> LoginPage extends AbstractBasePage
> OtherPage extends AbstractBasePage implements MyInterface
> The important part here is the MyInterface
> By default Swarm only does an instantiation check on components with
> the ISecurePage interface (which is implemented by SecureWebPage).
> But you can change this to any interface you like as long as the
> interface extends ISecureComponent.
> To do this you need to overwrite the setupStrategyFactory method of
> SwarmWebApplication to do
> setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));
>
> Personally i would go for option 1 as you can simply copy the
> implementation for ISecurePage from SecureWebPage
>
> BTW once you have the ldap part up and running and if it is setup in a
> generic way i would be interested in including it with swarm or a
> subproject if thats alright with you.
>
> Maurice
>
> On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> > I do have another question...
> >
> > According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
> >
> > Example 1:
> > AbstractBasePage extends SecureWebPage (wrapper)
> >
> > LoginPage extends AbstractBasePage (will not work)
> > OtherPage1 extends AbstractBasePage
> > OtherPage2 extends AbstractBasePage
> > ...
> >
> > Example 2:
> > AbstractBasePage extends WebPage (wrapper)
> >
> > LoginPage extends AbstractBasePage
> > OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > ...
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> >
> > Sent: Friday, January 04, 2008 1:24 PM
> > To: users@wicket.apache.org
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> > Sent: Friday, January 04, 2008 1:14 PM
> > To: users@wicket.apache.org
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
> >
> >         public WaspSession(WaspApplication application, Request request)
> >         {
> >                 super(request);
> >                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
> >         }
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Friday, January 04, 2008 11:16 AM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > I think there will be one more beta before we do the final.
> > I recently made some changes to boost performance and a public beta
> > for that will be better. Even though we are already using it in our
> > apps without problems through the snapshot release.
> > With any luck the 2nd beta will be released this weekend and the final
> > will probably follow soon after.
> >
> > Well the slightly more complex route is connecting to ldap yourself
> > (option number 1 in my previous mail).
> > Personally i think the mapping between ldap and swarm will be a
> > breeze. because a swarm principal is basically just a name.
> >
> > Maurice
> >
> > On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> > >
> > > Do you have a roadmap/timeline on a release date for wicket-security?
> > >
> > >
> > > -----Original Message-----
> > > From: Maurice Marrink [mailto:marrink@gmail.com]
> > > Sent: Friday, January 04, 2008 8:36 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: [wicket-security] LDAP integration?
> > >
> > >
> > > Yes and not exactly.
> > >
> > > wicket-security is build with plugability in mind, meaning if it does
> > > not yet exist you can build it yourself quite easily.
> > > Regarding LDAP, i myself have never worked with it but there are a
> > > couple of options you can try
> > > -use swarm and map ldap permissions to swarm principals
> > > -use swarm with acegi and let acegi handle the ldap part, you still
> > > need to map acegi permissions to swarm principals though but it saves
> > > you from having to do all the ldap connection stuff yourself
> > > -use wasp and build your own ldap implementation, more work but also
> > > more control
> > >
> > > As for the ldap example part, i am afraid you are somewhat on your own.
> > > There is however an example showing how to integrate swarm with acegi
> > > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > > and there is an other example showing wicket-auth-roles acegi and ldap
> > > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > > So if you rip the ldap config from the last example and use it in the
> > > first example instead of the TestingAuthenticationProvider you should
> > > be ready to go
> > > The example also has some suggestion on how you could do your own ldap
> > > permission mapping if you choose to go that way.
> > >
> > > If you decide to go all out and build directly on wasp you should take
> > > a look at swarm itself a a reference, just ignore all the stuff about
> > > permissions, principals, subjects and stuff.
> > >
> > > Maurice
> > >
> > > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
My only worry about copying the onliners from Secure(Web)Page into MySecurePage is if they change. Every new wicket-security release we would have to check to make sure that nothing changed in Secure(Web)Page to prevent possible issues. I understand that the code is trivial and probably will not change significantly in the future, but the only true guarantee is only what is defined in the interface contract. I think a mount solution is worth further investigation. When I have time I will look into how to implement it (if possible). For now, I will live with the copy and paste and use your proposed solution. Thanks for your help! I will let you know how thinks turn out with ldap :o) 

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Monday, January 07, 2008 11:06 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


Do you mean that little bit of insignificant code in the Secure(Web)Page ?
All that does is redirect to the SecureComponentHelper so i would not
call that code duplication.
Even more all SecureComponents i create use the same oneliners to
redirect to SecureComponentHelper.

Regarding the mount, i am not sure if you can get the mount path if
all you have is a page class (you probably can somehow but i don't
know how)
In that case you can extend SwarmStrategy and use the mount path to
check for instantiation permission.
But i would not recommend that just to avoid "code duplication", if it
really bothers you you can go ahead with option 2 and use a custom
interface for instantiation checking.
Or you could try and ignore the fact that the login page should not be
a SecurePage and try it anyway, i am not a 100% sure it will work but
i did make some exceptions that bypass the instantiation check if the
page class in question is the login page, so give it a try.
The reason the documentation says you should not have your login page
extend SecurePage is because it just doesn't feel right to do so.

Maurice

On Jan 7, 2008 3:24 PM, William Hoover <wh...@nemours.org> wrote:
> oops!!!
>
> *definitely*
>
> -----Original Message-----
> From: William Hoover
> Sent: Monday, January 07, 2008 9:23 AM
> To: 'users@wicket.apache.org'
>
> Subject: RE: [wicket-security] LDAP integration?
>
>
> The only issue I have with proposed solution 1 is that there is duplication of code, but I cannot see a simple way around it. Is it plausible to adopt the same strategy that we mount pages? I was thinking that doing something like:
>
> mountSecurePage(MySecureWebPage.class)
>
> ...may be a nice alternative to actually extending SecureWebPage.
>
> I will defiantly contribute any ldap integration code once I am able to get it working properly ;o)
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Saturday, January 05, 2008 12:16 PM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> You could do LoginPage extends AbstractBasePage
> MySecurePage extends AbstractBasePage implements ISecurePage
> OtherPage extends MySecurePage
>
> Or alternatively
> MyInterface extends ISecurePage
> AbstractBasePage extends SecureWebPage
> LoginPage extends AbstractBasePage
> OtherPage extends AbstractBasePage implements MyInterface
> The important part here is the MyInterface
> By default Swarm only does an instantiation check on components with
> the ISecurePage interface (which is implemented by SecureWebPage).
> But you can change this to any interface you like as long as the
> interface extends ISecureComponent.
> To do this you need to overwrite the setupStrategyFactory method of
> SwarmWebApplication to do
> setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));
>
> Personally i would go for option 1 as you can simply copy the
> implementation for ISecurePage from SecureWebPage
>
> BTW once you have the ldap part up and running and if it is setup in a
> generic way i would be interested in including it with swarm or a
> subproject if thats alright with you.
>
> Maurice
>
> On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> > I do have another question...
> >
> > According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
> >
> > Example 1:
> > AbstractBasePage extends SecureWebPage (wrapper)
> >
> > LoginPage extends AbstractBasePage (will not work)
> > OtherPage1 extends AbstractBasePage
> > OtherPage2 extends AbstractBasePage
> > ...
> >
> > Example 2:
> > AbstractBasePage extends WebPage (wrapper)
> >
> > LoginPage extends AbstractBasePage
> > OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > ...
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> >
> > Sent: Friday, January 04, 2008 1:24 PM
> > To: users@wicket.apache.org
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> > Sent: Friday, January 04, 2008 1:14 PM
> > To: users@wicket.apache.org
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
> >
> >         public WaspSession(WaspApplication application, Request request)
> >         {
> >                 super(request);
> >                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
> >         }
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Friday, January 04, 2008 11:16 AM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > I think there will be one more beta before we do the final.
> > I recently made some changes to boost performance and a public beta
> > for that will be better. Even though we are already using it in our
> > apps without problems through the snapshot release.
> > With any luck the 2nd beta will be released this weekend and the final
> > will probably follow soon after.
> >
> > Well the slightly more complex route is connecting to ldap yourself
> > (option number 1 in my previous mail).
> > Personally i think the mapping between ldap and swarm will be a
> > breeze. because a swarm principal is basically just a name.
> >
> > Maurice
> >
> > On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> > >
> > > Do you have a roadmap/timeline on a release date for wicket-security?
> > >
> > >
> > > -----Original Message-----
> > > From: Maurice Marrink [mailto:marrink@gmail.com]
> > > Sent: Friday, January 04, 2008 8:36 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: [wicket-security] LDAP integration?
> > >
> > >
> > > Yes and not exactly.
> > >
> > > wicket-security is build with plugability in mind, meaning if it does
> > > not yet exist you can build it yourself quite easily.
> > > Regarding LDAP, i myself have never worked with it but there are a
> > > couple of options you can try
> > > -use swarm and map ldap permissions to swarm principals
> > > -use swarm with acegi and let acegi handle the ldap part, you still
> > > need to map acegi permissions to swarm principals though but it saves
> > > you from having to do all the ldap connection stuff yourself
> > > -use wasp and build your own ldap implementation, more work but also
> > > more control
> > >
> > > As for the ldap example part, i am afraid you are somewhat on your own.
> > > There is however an example showing how to integrate swarm with acegi
> > > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > > and there is an other example showing wicket-auth-roles acegi and ldap
> > > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > > So if you rip the ldap config from the last example and use it in the
> > > first example instead of the TestingAuthenticationProvider you should
> > > be ready to go
> > > The example also has some suggestion on how you could do your own ldap
> > > permission mapping if you choose to go that way.
> > >
> > > If you decide to go all out and build directly on wasp you should take
> > > a look at swarm itself a a reference, just ignore all the stuff about
> > > permissions, principals, subjects and stuff.
> > >
> > > Maurice
> > >
> > > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-security] LDAP integration?

Posted by Maurice Marrink <ma...@gmail.com>.
Do you mean that little bit of insignificant code in the Secure(Web)Page ?
All that does is redirect to the SecureComponentHelper so i would not
call that code duplication.
Even more all SecureComponents i create use the same oneliners to
redirect to SecureComponentHelper.

Regarding the mount, i am not sure if you can get the mount path if
all you have is a page class (you probably can somehow but i don't
know how)
In that case you can extend SwarmStrategy and use the mount path to
check for instantiation permission.
But i would not recommend that just to avoid "code duplication", if it
really bothers you you can go ahead with option 2 and use a custom
interface for instantiation checking.
Or you could try and ignore the fact that the login page should not be
a SecurePage and try it anyway, i am not a 100% sure it will work but
i did make some exceptions that bypass the instantiation check if the
page class in question is the login page, so give it a try.
The reason the documentation says you should not have your login page
extend SecurePage is because it just doesn't feel right to do so.

Maurice

On Jan 7, 2008 3:24 PM, William Hoover <wh...@nemours.org> wrote:
> oops!!!
>
> *definitely*
>
> -----Original Message-----
> From: William Hoover
> Sent: Monday, January 07, 2008 9:23 AM
> To: 'users@wicket.apache.org'
>
> Subject: RE: [wicket-security] LDAP integration?
>
>
> The only issue I have with proposed solution 1 is that there is duplication of code, but I cannot see a simple way around it. Is it plausible to adopt the same strategy that we mount pages? I was thinking that doing something like:
>
> mountSecurePage(MySecureWebPage.class)
>
> ...may be a nice alternative to actually extending SecureWebPage.
>
> I will defiantly contribute any ldap integration code once I am able to get it working properly ;o)
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Saturday, January 05, 2008 12:16 PM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> You could do LoginPage extends AbstractBasePage
> MySecurePage extends AbstractBasePage implements ISecurePage
> OtherPage extends MySecurePage
>
> Or alternatively
> MyInterface extends ISecurePage
> AbstractBasePage extends SecureWebPage
> LoginPage extends AbstractBasePage
> OtherPage extends AbstractBasePage implements MyInterface
> The important part here is the MyInterface
> By default Swarm only does an instantiation check on components with
> the ISecurePage interface (which is implemented by SecureWebPage).
> But you can change this to any interface you like as long as the
> interface extends ISecureComponent.
> To do this you need to overwrite the setupStrategyFactory method of
> SwarmWebApplication to do
> setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));
>
> Personally i would go for option 1 as you can simply copy the
> implementation for ISecurePage from SecureWebPage
>
> BTW once you have the ldap part up and running and if it is setup in a
> generic way i would be interested in including it with swarm or a
> subproject if thats alright with you.
>
> Maurice
>
> On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> > I do have another question...
> >
> > According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
> >
> > Example 1:
> > AbstractBasePage extends SecureWebPage (wrapper)
> >
> > LoginPage extends AbstractBasePage (will not work)
> > OtherPage1 extends AbstractBasePage
> > OtherPage2 extends AbstractBasePage
> > ...
> >
> > Example 2:
> > AbstractBasePage extends WebPage (wrapper)
> >
> > LoginPage extends AbstractBasePage
> > OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> > ...
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> >
> > Sent: Friday, January 04, 2008 1:24 PM
> > To: users@wicket.apache.org
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
> >
> > -----Original Message-----
> > From: William Hoover [mailto:whoover@nemours.org]
> > Sent: Friday, January 04, 2008 1:14 PM
> > To: users@wicket.apache.org
> > Subject: RE: [wicket-security] LDAP integration?
> >
> >
> > I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
> >
> >         public WaspSession(WaspApplication application, Request request)
> >         {
> >                 super(request);
> >                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
> >         }
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Friday, January 04, 2008 11:16 AM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > I think there will be one more beta before we do the final.
> > I recently made some changes to boost performance and a public beta
> > for that will be better. Even though we are already using it in our
> > apps without problems through the snapshot release.
> > With any luck the 2nd beta will be released this weekend and the final
> > will probably follow soon after.
> >
> > Well the slightly more complex route is connecting to ldap yourself
> > (option number 1 in my previous mail).
> > Personally i think the mapping between ldap and swarm will be a
> > breeze. because a swarm principal is basically just a name.
> >
> > Maurice
> >
> > On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> > >
> > > Do you have a roadmap/timeline on a release date for wicket-security?
> > >
> > >
> > > -----Original Message-----
> > > From: Maurice Marrink [mailto:marrink@gmail.com]
> > > Sent: Friday, January 04, 2008 8:36 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: [wicket-security] LDAP integration?
> > >
> > >
> > > Yes and not exactly.
> > >
> > > wicket-security is build with plugability in mind, meaning if it does
> > > not yet exist you can build it yourself quite easily.
> > > Regarding LDAP, i myself have never worked with it but there are a
> > > couple of options you can try
> > > -use swarm and map ldap permissions to swarm principals
> > > -use swarm with acegi and let acegi handle the ldap part, you still
> > > need to map acegi permissions to swarm principals though but it saves
> > > you from having to do all the ldap connection stuff yourself
> > > -use wasp and build your own ldap implementation, more work but also
> > > more control
> > >
> > > As for the ldap example part, i am afraid you are somewhat on your own.
> > > There is however an example showing how to integrate swarm with acegi
> > > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > > and there is an other example showing wicket-auth-roles acegi and ldap
> > > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > > So if you rip the ldap config from the last example and use it in the
> > > first example instead of the TestingAuthenticationProvider you should
> > > be ready to go
> > > The example also has some suggestion on how you could do your own ldap
> > > permission mapping if you choose to go that way.
> > >
> > > If you decide to go all out and build directly on wasp you should take
> > > a look at swarm itself a a reference, just ignore all the stuff about
> > > permissions, principals, subjects and stuff.
> > >
> > > Maurice
> > >
> > > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
oops!!! 

*definitely*

-----Original Message-----
From: William Hoover 
Sent: Monday, January 07, 2008 9:23 AM
To: 'users@wicket.apache.org'
Subject: RE: [wicket-security] LDAP integration?


The only issue I have with proposed solution 1 is that there is duplication of code, but I cannot see a simple way around it. Is it plausible to adopt the same strategy that we mount pages? I was thinking that doing something like:

mountSecurePage(MySecureWebPage.class)

...may be a nice alternative to actually extending SecureWebPage.

I will defiantly contribute any ldap integration code once I am able to get it working properly ;o)

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Saturday, January 05, 2008 12:16 PM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


You could do LoginPage extends AbstractBasePage
MySecurePage extends AbstractBasePage implements ISecurePage
OtherPage extends MySecurePage

Or alternatively
MyInterface extends ISecurePage
AbstractBasePage extends SecureWebPage
LoginPage extends AbstractBasePage
OtherPage extends AbstractBasePage implements MyInterface
The important part here is the MyInterface
By default Swarm only does an instantiation check on components with
the ISecurePage interface (which is implemented by SecureWebPage).
But you can change this to any interface you like as long as the
interface extends ISecureComponent.
To do this you need to overwrite the setupStrategyFactory method of
SwarmWebApplication to do
setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));

Personally i would go for option 1 as you can simply copy the
implementation for ISecurePage from SecureWebPage

BTW once you have the ldap part up and running and if it is setup in a
generic way i would be interested in including it with swarm or a
subproject if thats alright with you.

Maurice

On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> I do have another question...
>
> According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
>
> Example 1:
> AbstractBasePage extends SecureWebPage (wrapper)
>
> LoginPage extends AbstractBasePage (will not work)
> OtherPage1 extends AbstractBasePage
> OtherPage2 extends AbstractBasePage
> ...
>
> Example 2:
> AbstractBasePage extends WebPage (wrapper)
>
> LoginPage extends AbstractBasePage
> OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> ...
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
>
> Sent: Friday, January 04, 2008 1:24 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
> Sent: Friday, January 04, 2008 1:14 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
>
>         public WaspSession(WaspApplication application, Request request)
>         {
>                 super(request);
>                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
>         }
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 11:16 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> I think there will be one more beta before we do the final.
> I recently made some changes to boost performance and a public beta
> for that will be better. Even though we are already using it in our
> apps without problems through the snapshot release.
> With any luck the 2nd beta will be released this weekend and the final
> will probably follow soon after.
>
> Well the slightly more complex route is connecting to ldap yourself
> (option number 1 in my previous mail).
> Personally i think the mapping between ldap and swarm will be a
> breeze. because a swarm principal is basically just a name.
>
> Maurice
>
> On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> >
> > Do you have a roadmap/timeline on a release date for wicket-security?
> >
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Friday, January 04, 2008 8:36 AM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > Yes and not exactly.
> >
> > wicket-security is build with plugability in mind, meaning if it does
> > not yet exist you can build it yourself quite easily.
> > Regarding LDAP, i myself have never worked with it but there are a
> > couple of options you can try
> > -use swarm and map ldap permissions to swarm principals
> > -use swarm with acegi and let acegi handle the ldap part, you still
> > need to map acegi permissions to swarm principals though but it saves
> > you from having to do all the ldap connection stuff yourself
> > -use wasp and build your own ldap implementation, more work but also
> > more control
> >
> > As for the ldap example part, i am afraid you are somewhat on your own.
> > There is however an example showing how to integrate swarm with acegi
> > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > and there is an other example showing wicket-auth-roles acegi and ldap
> > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > So if you rip the ldap config from the last example and use it in the
> > first example instead of the TestingAuthenticationProvider you should
> > be ready to go
> > The example also has some suggestion on how you could do your own ldap
> > permission mapping if you choose to go that way.
> >
> > If you decide to go all out and build directly on wasp you should take
> > a look at swarm itself a a reference, just ignore all the stuff about
> > permissions, principals, subjects and stuff.
> >
> > Maurice
> >
> > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
The only issue I have with proposed solution 1 is that there is duplication of code, but I cannot see a simple way around it. Is it plausible to adopt the same strategy that we mount pages? I was thinking that doing something like:

mountSecurePage(MySecureWebPage.class)

...may be a nice alternative to actually extending SecureWebPage.

I will defiantly contribute any ldap integration code once I am able to get it working properly ;o)

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Saturday, January 05, 2008 12:16 PM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


You could do LoginPage extends AbstractBasePage
MySecurePage extends AbstractBasePage implements ISecurePage
OtherPage extends MySecurePage

Or alternatively
MyInterface extends ISecurePage
AbstractBasePage extends SecureWebPage
LoginPage extends AbstractBasePage
OtherPage extends AbstractBasePage implements MyInterface
The important part here is the MyInterface
By default Swarm only does an instantiation check on components with
the ISecurePage interface (which is implemented by SecureWebPage).
But you can change this to any interface you like as long as the
interface extends ISecureComponent.
To do this you need to overwrite the setupStrategyFactory method of
SwarmWebApplication to do
setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));

Personally i would go for option 1 as you can simply copy the
implementation for ISecurePage from SecureWebPage

BTW once you have the ldap part up and running and if it is setup in a
generic way i would be interested in including it with swarm or a
subproject if thats alright with you.

Maurice

On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> I do have another question...
>
> According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
>
> Example 1:
> AbstractBasePage extends SecureWebPage (wrapper)
>
> LoginPage extends AbstractBasePage (will not work)
> OtherPage1 extends AbstractBasePage
> OtherPage2 extends AbstractBasePage
> ...
>
> Example 2:
> AbstractBasePage extends WebPage (wrapper)
>
> LoginPage extends AbstractBasePage
> OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> ...
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
>
> Sent: Friday, January 04, 2008 1:24 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
> Sent: Friday, January 04, 2008 1:14 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
>
>         public WaspSession(WaspApplication application, Request request)
>         {
>                 super(request);
>                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
>         }
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 11:16 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> I think there will be one more beta before we do the final.
> I recently made some changes to boost performance and a public beta
> for that will be better. Even though we are already using it in our
> apps without problems through the snapshot release.
> With any luck the 2nd beta will be released this weekend and the final
> will probably follow soon after.
>
> Well the slightly more complex route is connecting to ldap yourself
> (option number 1 in my previous mail).
> Personally i think the mapping between ldap and swarm will be a
> breeze. because a swarm principal is basically just a name.
>
> Maurice
>
> On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> >
> > Do you have a roadmap/timeline on a release date for wicket-security?
> >
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Friday, January 04, 2008 8:36 AM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > Yes and not exactly.
> >
> > wicket-security is build with plugability in mind, meaning if it does
> > not yet exist you can build it yourself quite easily.
> > Regarding LDAP, i myself have never worked with it but there are a
> > couple of options you can try
> > -use swarm and map ldap permissions to swarm principals
> > -use swarm with acegi and let acegi handle the ldap part, you still
> > need to map acegi permissions to swarm principals though but it saves
> > you from having to do all the ldap connection stuff yourself
> > -use wasp and build your own ldap implementation, more work but also
> > more control
> >
> > As for the ldap example part, i am afraid you are somewhat on your own.
> > There is however an example showing how to integrate swarm with acegi
> > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > and there is an other example showing wicket-auth-roles acegi and ldap
> > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > So if you rip the ldap config from the last example and use it in the
> > first example instead of the TestingAuthenticationProvider you should
> > be ready to go
> > The example also has some suggestion on how you could do your own ldap
> > permission mapping if you choose to go that way.
> >
> > If you decide to go all out and build directly on wasp you should take
> > a look at swarm itself a a reference, just ignore all the stuff about
> > permissions, principals, subjects and stuff.
> >
> > Maurice
> >
> > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-security] LDAP integration?

Posted by Maurice Marrink <ma...@gmail.com>.
You could do LoginPage extends AbstractBasePage
MySecurePage extends AbstractBasePage implements ISecurePage
OtherPage extends MySecurePage

Or alternatively
MyInterface extends ISecurePage
AbstractBasePage extends SecureWebPage
LoginPage extends AbstractBasePage
OtherPage extends AbstractBasePage implements MyInterface
The important part here is the MyInterface
By default Swarm only does an instantiation check on components with
the ISecurePage interface (which is implemented by SecureWebPage).
But you can change this to any interface you like as long as the
interface extends ISecureComponent.
To do this you need to overwrite the setupStrategyFactory method of
SwarmWebApplication to do
setStrategyFactory(new SwarmStrategyFactory(MyInterface.class,getHiveKey()));

Personally i would go for option 1 as you can simply copy the
implementation for ISecurePage from SecureWebPage

BTW once you have the ldap part up and running and if it is setup in a
generic way i would be interested in including it with swarm or a
subproject if thats alright with you.

Maurice

On Jan 4, 2008 8:39 PM, William Hoover <wh...@nemours.org> wrote:
> I do have another question...
>
> According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:
>
> Example 1:
> AbstractBasePage extends SecureWebPage (wrapper)
>
> LoginPage extends AbstractBasePage (will not work)
> OtherPage1 extends AbstractBasePage
> OtherPage2 extends AbstractBasePage
> ...
>
> Example 2:
> AbstractBasePage extends WebPage (wrapper)
>
> LoginPage extends AbstractBasePage
> OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
> ...
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
>
> Sent: Friday, January 04, 2008 1:24 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl
>
> -----Original Message-----
> From: William Hoover [mailto:whoover@nemours.org]
> Sent: Friday, January 04, 2008 1:14 PM
> To: users@wicket.apache.org
> Subject: RE: [wicket-security] LDAP integration?
>
>
> I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?
>
>         public WaspSession(WaspApplication application, Request request)
>         {
>                 super(request);
>                 securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
>         }
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 11:16 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> I think there will be one more beta before we do the final.
> I recently made some changes to boost performance and a public beta
> for that will be better. Even though we are already using it in our
> apps without problems through the snapshot release.
> With any luck the 2nd beta will be released this weekend and the final
> will probably follow soon after.
>
> Well the slightly more complex route is connecting to ldap yourself
> (option number 1 in my previous mail).
> Personally i think the mapping between ldap and swarm will be a
> breeze. because a swarm principal is basically just a name.
>
> Maurice
>
> On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> > Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
> >
> > Do you have a roadmap/timeline on a release date for wicket-security?
> >
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Friday, January 04, 2008 8:36 AM
> > To: users@wicket.apache.org
> > Subject: Re: [wicket-security] LDAP integration?
> >
> >
> > Yes and not exactly.
> >
> > wicket-security is build with plugability in mind, meaning if it does
> > not yet exist you can build it yourself quite easily.
> > Regarding LDAP, i myself have never worked with it but there are a
> > couple of options you can try
> > -use swarm and map ldap permissions to swarm principals
> > -use swarm with acegi and let acegi handle the ldap part, you still
> > need to map acegi permissions to swarm principals though but it saves
> > you from having to do all the ldap connection stuff yourself
> > -use wasp and build your own ldap implementation, more work but also
> > more control
> >
> > As for the ldap example part, i am afraid you are somewhat on your own.
> > There is however an example showing how to integrate swarm with acegi
> > http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> > and there is an other example showing wicket-auth-roles acegi and ldap
> > http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> > So if you rip the ldap config from the last example and use it in the
> > first example instead of the TestingAuthenticationProvider you should
> > be ready to go
> > The example also has some suggestion on how you could do your own ldap
> > permission mapping if you choose to go that way.
> >
> > If you decide to go all out and build directly on wasp you should take
> > a look at swarm itself a a reference, just ignore all the stuff about
> > permissions, principals, subjects and stuff.
> >
> > Maurice
> >
> > On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
I do have another question...

According to the documentation one should not extend SecureWebPage for the login page (makes sense), but if you have a decorator that is used on all of your pages (including the login page) how can you accomplish this? For example:

Example 1:
AbstractBasePage extends SecureWebPage (wrapper)

LoginPage extends AbstractBasePage (will not work)
OtherPage1 extends AbstractBasePage
OtherPage2 extends AbstractBasePage
...

Example 2:
AbstractBasePage extends WebPage (wrapper)

LoginPage extends AbstractBasePage 
OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
...

-----Original Message-----
From: William Hoover [mailto:whoover@nemours.org]
Sent: Friday, January 04, 2008 1:24 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl

-----Original Message-----
From: William Hoover [mailto:whoover@nemours.org]
Sent: Friday, January 04, 2008 1:14 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?

	public WaspSession(WaspApplication application, Request request)
	{
		super(request);
		securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
	}

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Friday, January 04, 2008 11:16 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
>
> Do you have a roadmap/timeline on a release date for wicket-security?
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 8:36 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> Yes and not exactly.
>
> wicket-security is build with plugability in mind, meaning if it does
> not yet exist you can build it yourself quite easily.
> Regarding LDAP, i myself have never worked with it but there are a
> couple of options you can try
> -use swarm and map ldap permissions to swarm principals
> -use swarm with acegi and let acegi handle the ldap part, you still
> need to map acegi permissions to swarm principals though but it saves
> you from having to do all the ldap connection stuff yourself
> -use wasp and build your own ldap implementation, more work but also
> more control
>
> As for the ldap example part, i am afraid you are somewhat on your own.
> There is however an example showing how to integrate swarm with acegi
> http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> and there is an other example showing wicket-auth-roles acegi and ldap
> http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> So if you rip the ldap config from the last example and use it in the
> first example instead of the TestingAuthenticationProvider you should
> be ready to go
> The example also has some suggestion on how you could do your own ldap
> permission mapping if you choose to go that way.
>
> If you decide to go all out and build directly on wasp you should take
> a look at swarm itself a a reference, just ignore all the stuff about
> permissions, principals, subjects and stuff.
>
> Maurice
>
> On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
Never mind... I wasn't calling super.init() when I was overriding init() in SwarmWebApplication impl

-----Original Message-----
From: William Hoover [mailto:whoover@nemours.org]
Sent: Friday, January 04, 2008 1:14 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?

	public WaspSession(WaspApplication application, Request request)
	{
		super(request);
		securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
	}

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Friday, January 04, 2008 11:16 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
>
> Do you have a roadmap/timeline on a release date for wicket-security?
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 8:36 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> Yes and not exactly.
>
> wicket-security is build with plugability in mind, meaning if it does
> not yet exist you can build it yourself quite easily.
> Regarding LDAP, i myself have never worked with it but there are a
> couple of options you can try
> -use swarm and map ldap permissions to swarm principals
> -use swarm with acegi and let acegi handle the ldap part, you still
> need to map acegi permissions to swarm principals though but it saves
> you from having to do all the ldap connection stuff yourself
> -use wasp and build your own ldap implementation, more work but also
> more control
>
> As for the ldap example part, i am afraid you are somewhat on your own.
> There is however an example showing how to integrate swarm with acegi
> http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> and there is an other example showing wicket-auth-roles acegi and ldap
> http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> So if you rip the ldap config from the last example and use it in the
> first example instead of the TestingAuthenticationProvider you should
> be ready to go
> The example also has some suggestion on how you could do your own ldap
> permission mapping if you choose to go that way.
>
> If you decide to go all out and build directly on wasp you should take
> a look at swarm itself a a reference, just ignore all the stuff about
> permissions, principals, subjects and stuff.
>
> Maurice
>
> On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
I'm with you... it doesn't seem to be too difficult to get the mapping between ldap/swarm working. I am attempting to try it out in a simple application. However, I am receiving a NullPointerException in WaspSession because the StrategyFactory is not instantiated. Is there something else that needs to be down in the SwarmWebApplication (following the instructions from http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?

	public WaspSession(WaspApplication application, Request request)
	{
		super(request);
		securityStrategy = application.getStrategyFactory().newStrategy(); // throws npe
	}

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Friday, January 04, 2008 11:16 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
>
> Do you have a roadmap/timeline on a release date for wicket-security?
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 8:36 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> Yes and not exactly.
>
> wicket-security is build with plugability in mind, meaning if it does
> not yet exist you can build it yourself quite easily.
> Regarding LDAP, i myself have never worked with it but there are a
> couple of options you can try
> -use swarm and map ldap permissions to swarm principals
> -use swarm with acegi and let acegi handle the ldap part, you still
> need to map acegi permissions to swarm principals though but it saves
> you from having to do all the ldap connection stuff yourself
> -use wasp and build your own ldap implementation, more work but also
> more control
>
> As for the ldap example part, i am afraid you are somewhat on your own.
> There is however an example showing how to integrate swarm with acegi
> http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> and there is an other example showing wicket-auth-roles acegi and ldap
> http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> So if you rip the ldap config from the last example and use it in the
> first example instead of the TestingAuthenticationProvider you should
> be ready to go
> The example also has some suggestion on how you could do your own ldap
> permission mapping if you choose to go that way.
>
> If you decide to go all out and build directly on wasp you should take
> a look at swarm itself a a reference, just ignore all the stuff about
> permissions, principals, subjects and stuff.
>
> Maurice
>
> On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-security] LDAP integration?

Posted by Maurice Marrink <ma...@gmail.com>.
I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover <wh...@nemours.org> wrote:
> Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.
>
> Do you have a roadmap/timeline on a release date for wicket-security?
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Friday, January 04, 2008 8:36 AM
> To: users@wicket.apache.org
> Subject: Re: [wicket-security] LDAP integration?
>
>
> Yes and not exactly.
>
> wicket-security is build with plugability in mind, meaning if it does
> not yet exist you can build it yourself quite easily.
> Regarding LDAP, i myself have never worked with it but there are a
> couple of options you can try
> -use swarm and map ldap permissions to swarm principals
> -use swarm with acegi and let acegi handle the ldap part, you still
> need to map acegi permissions to swarm principals though but it saves
> you from having to do all the ldap connection stuff yourself
> -use wasp and build your own ldap implementation, more work but also
> more control
>
> As for the ldap example part, i am afraid you are somewhat on your own.
> There is however an example showing how to integrate swarm with acegi
> http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
> and there is an other example showing wicket-auth-roles acegi and ldap
> http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
> So if you rip the ldap config from the last example and use it in the
> first example instead of the TestingAuthenticationProvider you should
> be ready to go
> The example also has some suggestion on how you could do your own ldap
> permission mapping if you choose to go that way.
>
> If you decide to go all out and build directly on wasp you should take
> a look at swarm itself a a reference, just ignore all the stuff about
> permissions, principals, subjects and stuff.
>
> Maurice
>
> On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> > Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure how plausible it will be to implement the easiest solution in our case. The application in question is still in the preliminary evaluation stage so we may have to look for another route.

Do you have a roadmap/timeline on a release date for wicket-security?

-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Friday, January 04, 2008 8:36 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


Yes and not exactly.

wicket-security is build with plugability in mind, meaning if it does
not yet exist you can build it yourself quite easily.
Regarding LDAP, i myself have never worked with it but there are a
couple of options you can try
-use swarm and map ldap permissions to swarm principals
-use swarm with acegi and let acegi handle the ldap part, you still
need to map acegi permissions to swarm principals though but it saves
you from having to do all the ldap connection stuff yourself
-use wasp and build your own ldap implementation, more work but also
more control

As for the ldap example part, i am afraid you are somewhat on your own.
There is however an example showing how to integrate swarm with acegi
http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
and there is an other example showing wicket-auth-roles acegi and ldap
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
So if you rip the ldap config from the last example and use it in the
first example instead of the TestingAuthenticationProvider you should
be ready to go
The example also has some suggestion on how you could do your own ldap
permission mapping if you choose to go that way.

If you decide to go all out and build directly on wasp you should take
a look at swarm itself a a reference, just ignore all the stuff about
permissions, principals, subjects and stuff.

Maurice

On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-security] LDAP integration?

Posted by Maurice Marrink <ma...@gmail.com>.
Yes and not exactly.

wicket-security is build with plugability in mind, meaning if it does
not yet exist you can build it yourself quite easily.
Regarding LDAP, i myself have never worked with it but there are a
couple of options you can try
-use swarm and map ldap permissions to swarm principals
-use swarm with acegi and let acegi handle the ldap part, you still
need to map acegi permissions to swarm principals though but it saves
you from having to do all the ldap connection stuff yourself
-use wasp and build your own ldap implementation, more work but also
more control

As for the ldap example part, i am afraid you are somewhat on your own.
There is however an example showing how to integrate swarm with acegi
http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
and there is an other example showing wicket-auth-roles acegi and ldap
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
So if you rip the ldap config from the last example and use it in the
first example instead of the TestingAuthenticationProvider you should
be ready to go
The example also has some suggestion on how you could do your own ldap
permission mapping if you choose to go that way.

If you decide to go all out and build directly on wasp you should take
a look at swarm itself a a reference, just ignore all the stuff about
permissions, principals, subjects and stuff.

Maurice

On Jan 4, 2008 2:15 PM, William Hoover <wh...@nemours.org> wrote:
> Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Igor Vaynberg <ig...@gmail.com>.
not sure where to point you...

-igor

On Jan 11, 2008 9:46 AM, cricdigs <cr...@gmail.com> wrote:
>
>
> Ah that did the trick Igor! Thank you so much!
>
> I am still having some issues getting to child components. Can you point me
> in the right direction there?
>
> Thanks again!
>
>
>
>
> igor.vaynberg wrote:
> >
> > create the spring application context or just a mock - depending on
> > your testing needs, then before giving the springwebapplication to the
> > tester call setApplicationContext(yourcontext); on it.
> >
> > -igor
> >
> >
> > On Jan 9, 2008 12:46 PM, cricdigs <cr...@gmail.com> wrote:
> >>
> >> I am not sure how to do that...
> >>
> >>
> >>
> >> igor.vaynberg wrote:
> >> >
> >> > spring web application expects the spring container to be available.
> >> > so you need to setup that first and make sure the tester can get to it
> >> >
> >> > -igor
> >> >
> >> >
> >> > On Jan 8, 2008 2:17 PM, cricdigs <cr...@gmail.com> wrote:
> >> >>
> >> >> Thanks for your quick reply. But sorry, not sure what you mean. This
> >> is
> >> >> my
> >> >> WicketTester:
> >> >>
> >> >> public class StoreWicketTester extends WicketTester {
> >> >>
> >> >>   public StoreWicketTester() {
> >> >>     super(new StoreApplication());
> >> >>   }
> >> >> }
> >> >>
> >> >> And StoreApplication extends SpringWebApplication:
> >> >> public class StoreApplication extends SpringWebApplication {
> >> >>
> >> >> ...
> >> >>
> >> >> }
> >> >>
> >> >> And my test invokes thus:
> >> >>     final StoreWicketTester wicketTester = new StoreWicketTester();
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> igor.vaynberg wrote:
> >> >> >
> >> >> > for springwebapplication you are used to mean
> >> >> springwebapplicationfactory
> >> >> >
> >> >> > -igor
> >> >> >
> >> >> >
> >> >> > On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> I have the same issue. If I use ZeuzGroupApplication.class I get
> >> the
> >> >> >> known
> >> >> >> issue of ClassCastException and  if I use the new
> >> >> ZeuzGroupApplication(),
> >> >> >> I
> >> >> >> get the following error. Any help will be greatly appreciated...
> >> >> >>
> >> >> >> Regards.
> >> >> >>
> >> >> >> java.lang.IllegalStateException: No WebApplicationContext found: no
> >> >> >> ContextLoaderListener registered?
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
> >> >> >>         at
> >> >> >>
> >> >>
> >> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> David Shepherdson-2 wrote:
> >> >> >> >
> >> >> >> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael
> >> >> wrote:
> >> >> >> >
> >> >> >> >> Ahh, that might just be it then.. I've just verified it. I guess
> >> I
> >> >> >> >> used a too general session, as you wrote the stuff passes when
> >> >> using
> >> >> >> >> websession. Im gonna close the bug.
> >> >> >> >>
> >> >> >> >> Thanks for your help.
> >> >> >> >
> >> >> >> > No probs -- glad there was a good explanation for it in the end!
> >> >> >> >
> >> >> >> > David
> >> >> >> >
> >> >> >> >
> >> >> ---------------------------------------------------------------------
> >> >> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> >> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
> >> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> >> >> For additional commands, e-mail: users-help@wicket.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> ---------------------------------------------------------------------
> >> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
> >> >>
> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> >> For additional commands, e-mail: users-help@wicket.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Wickettester-and-session--tp14459864p14721011.html
> >>
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14761724.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by cricdigs <cr...@gmail.com>.
thats alright, my bad, data issues on my end...


cricdigs wrote:
> 
> 
> Ah that did the trick Igor! Thank you so much!
> 
> I am still having some issues getting to child components. Can you point
> me in the right direction there?
> 
> Thanks again!
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> create the spring application context or just a mock - depending on
>> your testing needs, then before giving the springwebapplication to the
>> tester call setApplicationContext(yourcontext); on it.
>> 
>> -igor
>> 
>> 
>> On Jan 9, 2008 12:46 PM, cricdigs <cr...@gmail.com> wrote:
>>>
>>> I am not sure how to do that...
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>> >
>>> > spring web application expects the spring container to be available.
>>> > so you need to setup that first and make sure the tester can get to it
>>> >
>>> > -igor
>>> >
>>> >
>>> > On Jan 8, 2008 2:17 PM, cricdigs <cr...@gmail.com> wrote:
>>> >>
>>> >> Thanks for your quick reply. But sorry, not sure what you mean. This
>>> is
>>> >> my
>>> >> WicketTester:
>>> >>
>>> >> public class StoreWicketTester extends WicketTester {
>>> >>
>>> >>   public StoreWicketTester() {
>>> >>     super(new StoreApplication());
>>> >>   }
>>> >> }
>>> >>
>>> >> And StoreApplication extends SpringWebApplication:
>>> >> public class StoreApplication extends SpringWebApplication {
>>> >>
>>> >> ...
>>> >>
>>> >> }
>>> >>
>>> >> And my test invokes thus:
>>> >>     final StoreWicketTester wicketTester = new StoreWicketTester();
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> igor.vaynberg wrote:
>>> >> >
>>> >> > for springwebapplication you are used to mean
>>> >> springwebapplicationfactory
>>> >> >
>>> >> > -igor
>>> >> >
>>> >> >
>>> >> > On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
>>> >> >>
>>> >> >> Hi,
>>> >> >>
>>> >> >> I have the same issue. If I use ZeuzGroupApplication.class I get
>>> the
>>> >> >> known
>>> >> >> issue of ClassCastException and  if I use the new
>>> >> ZeuzGroupApplication(),
>>> >> >> I
>>> >> >> get the following error. Any help will be greatly appreciated...
>>> >> >>
>>> >> >> Regards.
>>> >> >>
>>> >> >> java.lang.IllegalStateException: No WebApplicationContext found:
>>> no
>>> >> >> ContextLoaderListener registered?
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
>>> >> >>         at
>>> >> >>
>>> >>
>>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> David Shepherdson-2 wrote:
>>> >> >> >
>>> >> >> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael
>>> >> wrote:
>>> >> >> >
>>> >> >> >> Ahh, that might just be it then.. I've just verified it. I
>>> guess I
>>> >> >> >> used a too general session, as you wrote the stuff passes when
>>> >> using
>>> >> >> >> websession. Im gonna close the bug.
>>> >> >> >>
>>> >> >> >> Thanks for your help.
>>> >> >> >
>>> >> >> > No probs -- glad there was a good explanation for it in the end!
>>> >> >> >
>>> >> >> > David
>>> >> >> >
>>> >> >> >
>>> >> ---------------------------------------------------------------------
>>> >> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> >> >> > For additional commands, e-mail: users-help@wicket.apache.org
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >>
>>> >> >> --
>>> >> >> View this message in context:
>>> >> >>
>>> >>
>>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
>>> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> >> >> For additional commands, e-mail: users-help@wicket.apache.org
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> ---------------------------------------------------------------------
>>> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> >> > For additional commands, e-mail: users-help@wicket.apache.org
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
>>> >>
>>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> >> For additional commands, e-mail: users-help@wicket.apache.org
>>> >>
>>> >>
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> > For additional commands, e-mail: users-help@wicket.apache.org
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Wickettester-and-session--tp14459864p14721011.html
>>>
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14764013.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by cricdigs <cr...@gmail.com>.

Ah that did the trick Igor! Thank you so much!

I am still having some issues getting to child components. Can you point me
in the right direction there?

Thanks again!



igor.vaynberg wrote:
> 
> create the spring application context or just a mock - depending on
> your testing needs, then before giving the springwebapplication to the
> tester call setApplicationContext(yourcontext); on it.
> 
> -igor
> 
> 
> On Jan 9, 2008 12:46 PM, cricdigs <cr...@gmail.com> wrote:
>>
>> I am not sure how to do that...
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > spring web application expects the spring container to be available.
>> > so you need to setup that first and make sure the tester can get to it
>> >
>> > -igor
>> >
>> >
>> > On Jan 8, 2008 2:17 PM, cricdigs <cr...@gmail.com> wrote:
>> >>
>> >> Thanks for your quick reply. But sorry, not sure what you mean. This
>> is
>> >> my
>> >> WicketTester:
>> >>
>> >> public class StoreWicketTester extends WicketTester {
>> >>
>> >>   public StoreWicketTester() {
>> >>     super(new StoreApplication());
>> >>   }
>> >> }
>> >>
>> >> And StoreApplication extends SpringWebApplication:
>> >> public class StoreApplication extends SpringWebApplication {
>> >>
>> >> ...
>> >>
>> >> }
>> >>
>> >> And my test invokes thus:
>> >>     final StoreWicketTester wicketTester = new StoreWicketTester();
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> igor.vaynberg wrote:
>> >> >
>> >> > for springwebapplication you are used to mean
>> >> springwebapplicationfactory
>> >> >
>> >> > -igor
>> >> >
>> >> >
>> >> > On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> I have the same issue. If I use ZeuzGroupApplication.class I get
>> the
>> >> >> known
>> >> >> issue of ClassCastException and  if I use the new
>> >> ZeuzGroupApplication(),
>> >> >> I
>> >> >> get the following error. Any help will be greatly appreciated...
>> >> >>
>> >> >> Regards.
>> >> >>
>> >> >> java.lang.IllegalStateException: No WebApplicationContext found: no
>> >> >> ContextLoaderListener registered?
>> >> >>         at
>> >> >>
>> >>
>> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
>> >> >>         at
>> >> >>
>> >>
>> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
>> >> >>         at
>> >> >>
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
>> >> >>         at
>> >> >>
>> >>
>> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
>> >> >>         at
>> >> >>
>> >>
>> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
>> >> >>         at
>> >> >>
>> >>
>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
>> >> >>         at
>> >> >>
>> >>
>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
>> >> >>
>> >> >>
>> >> >>
>> >> >> David Shepherdson-2 wrote:
>> >> >> >
>> >> >> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael
>> >> wrote:
>> >> >> >
>> >> >> >> Ahh, that might just be it then.. I've just verified it. I guess
>> I
>> >> >> >> used a too general session, as you wrote the stuff passes when
>> >> using
>> >> >> >> websession. Im gonna close the bug.
>> >> >> >>
>> >> >> >> Thanks for your help.
>> >> >> >
>> >> >> > No probs -- glad there was a good explanation for it in the end!
>> >> >> >
>> >> >> > David
>> >> >> >
>> >> >> >
>> >> ---------------------------------------------------------------------
>> >> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> >> > For additional commands, e-mail: users-help@wicket.apache.org
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
>> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> > For additional commands, e-mail: users-help@wicket.apache.org
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
>> >>
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Wickettester-and-session--tp14459864p14721011.html
>>
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14761724.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Igor Vaynberg <ig...@gmail.com>.
create the spring application context or just a mock - depending on
your testing needs, then before giving the springwebapplication to the
tester call setApplicationContext(yourcontext); on it.

-igor


On Jan 9, 2008 12:46 PM, cricdigs <cr...@gmail.com> wrote:
>
> I am not sure how to do that...
>
>
>
> igor.vaynberg wrote:
> >
> > spring web application expects the spring container to be available.
> > so you need to setup that first and make sure the tester can get to it
> >
> > -igor
> >
> >
> > On Jan 8, 2008 2:17 PM, cricdigs <cr...@gmail.com> wrote:
> >>
> >> Thanks for your quick reply. But sorry, not sure what you mean. This is
> >> my
> >> WicketTester:
> >>
> >> public class StoreWicketTester extends WicketTester {
> >>
> >>   public StoreWicketTester() {
> >>     super(new StoreApplication());
> >>   }
> >> }
> >>
> >> And StoreApplication extends SpringWebApplication:
> >> public class StoreApplication extends SpringWebApplication {
> >>
> >> ...
> >>
> >> }
> >>
> >> And my test invokes thus:
> >>     final StoreWicketTester wicketTester = new StoreWicketTester();
> >>
> >>
> >>
> >>
> >>
> >> igor.vaynberg wrote:
> >> >
> >> > for springwebapplication you are used to mean
> >> springwebapplicationfactory
> >> >
> >> > -igor
> >> >
> >> >
> >> > On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I have the same issue. If I use ZeuzGroupApplication.class I get the
> >> >> known
> >> >> issue of ClassCastException and  if I use the new
> >> ZeuzGroupApplication(),
> >> >> I
> >> >> get the following error. Any help will be greatly appreciated...
> >> >>
> >> >> Regards.
> >> >>
> >> >> java.lang.IllegalStateException: No WebApplicationContext found: no
> >> >> ContextLoaderListener registered?
> >> >>         at
> >> >>
> >> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
> >> >>         at
> >> >>
> >> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
> >> >>         at
> >> >>
> >> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
> >> >>         at
> >> >>
> >> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
> >> >>         at
> >> >>
> >> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
> >> >>         at
> >> >>
> >> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
> >> >>         at
> >> >>
> >> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
> >> >>
> >> >>
> >> >>
> >> >> David Shepherdson-2 wrote:
> >> >> >
> >> >> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael
> >> wrote:
> >> >> >
> >> >> >> Ahh, that might just be it then.. I've just verified it. I guess I
> >> >> >> used a too general session, as you wrote the stuff passes when
> >> using
> >> >> >> websession. Im gonna close the bug.
> >> >> >>
> >> >> >> Thanks for your help.
> >> >> >
> >> >> > No probs -- glad there was a good explanation for it in the end!
> >> >> >
> >> >> > David
> >> >> >
> >> >> >
> >> ---------------------------------------------------------------------
> >> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
> >> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> >> For additional commands, e-mail: users-help@wicket.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
> >>
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14721011.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by cricdigs <cr...@gmail.com>.
I am not sure how to do that...


igor.vaynberg wrote:
> 
> spring web application expects the spring container to be available.
> so you need to setup that first and make sure the tester can get to it
> 
> -igor
> 
> 
> On Jan 8, 2008 2:17 PM, cricdigs <cr...@gmail.com> wrote:
>>
>> Thanks for your quick reply. But sorry, not sure what you mean. This is
>> my
>> WicketTester:
>>
>> public class StoreWicketTester extends WicketTester {
>>
>>   public StoreWicketTester() {
>>     super(new StoreApplication());
>>   }
>> }
>>
>> And StoreApplication extends SpringWebApplication:
>> public class StoreApplication extends SpringWebApplication {
>>
>> ...
>>
>> }
>>
>> And my test invokes thus:
>>     final StoreWicketTester wicketTester = new StoreWicketTester();
>>
>>
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > for springwebapplication you are used to mean
>> springwebapplicationfactory
>> >
>> > -igor
>> >
>> >
>> > On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have the same issue. If I use ZeuzGroupApplication.class I get the
>> >> known
>> >> issue of ClassCastException and  if I use the new
>> ZeuzGroupApplication(),
>> >> I
>> >> get the following error. Any help will be greatly appreciated...
>> >>
>> >> Regards.
>> >>
>> >> java.lang.IllegalStateException: No WebApplicationContext found: no
>> >> ContextLoaderListener registered?
>> >>         at
>> >>
>> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
>> >>         at
>> >>
>> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
>> >>         at
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
>> >>         at
>> >>
>> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
>> >>         at
>> >>
>> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
>> >>         at
>> >>
>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
>> >>         at
>> >>
>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
>> >>
>> >>
>> >>
>> >> David Shepherdson-2 wrote:
>> >> >
>> >> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael
>> wrote:
>> >> >
>> >> >> Ahh, that might just be it then.. I've just verified it. I guess I
>> >> >> used a too general session, as you wrote the stuff passes when
>> using
>> >> >> websession. Im gonna close the bug.
>> >> >>
>> >> >> Thanks for your help.
>> >> >
>> >> > No probs -- glad there was a good explanation for it in the end!
>> >> >
>> >> > David
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> > For additional commands, e-mail: users-help@wicket.apache.org
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
>>
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14721011.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Igor Vaynberg <ig...@gmail.com>.
spring web application expects the spring container to be available.
so you need to setup that first and make sure the tester can get to it

-igor


On Jan 8, 2008 2:17 PM, cricdigs <cr...@gmail.com> wrote:
>
> Thanks for your quick reply. But sorry, not sure what you mean. This is my
> WicketTester:
>
> public class StoreWicketTester extends WicketTester {
>
>   public StoreWicketTester() {
>     super(new StoreApplication());
>   }
> }
>
> And StoreApplication extends SpringWebApplication:
> public class StoreApplication extends SpringWebApplication {
>
> ...
>
> }
>
> And my test invokes thus:
>     final StoreWicketTester wicketTester = new StoreWicketTester();
>
>
>
>
>
> igor.vaynberg wrote:
> >
> > for springwebapplication you are used to mean springwebapplicationfactory
> >
> > -igor
> >
> >
> > On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I have the same issue. If I use ZeuzGroupApplication.class I get the
> >> known
> >> issue of ClassCastException and  if I use the new ZeuzGroupApplication(),
> >> I
> >> get the following error. Any help will be greatly appreciated...
> >>
> >> Regards.
> >>
> >> java.lang.IllegalStateException: No WebApplicationContext found: no
> >> ContextLoaderListener registered?
> >>         at
> >> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
> >>         at
> >> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
> >>         at
> >> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
> >>         at
> >> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
> >>         at
> >> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
> >>         at
> >> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
> >>         at
> >> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
> >>
> >>
> >>
> >> David Shepherdson-2 wrote:
> >> >
> >> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael wrote:
> >> >
> >> >> Ahh, that might just be it then.. I've just verified it. I guess I
> >> >> used a too general session, as you wrote the stuff passes when using
> >> >> websession. Im gonna close the bug.
> >> >>
> >> >> Thanks for your help.
> >> >
> >> > No probs -- glad there was a good explanation for it in the end!
> >> >
> >> > David
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by cricdigs <cr...@gmail.com>.
Thanks for your quick reply. But sorry, not sure what you mean. This is my
WicketTester:

public class StoreWicketTester extends WicketTester {

  public StoreWicketTester() {
    super(new StoreApplication());
  }
}

And StoreApplication extends SpringWebApplication:
public class StoreApplication extends SpringWebApplication {

...

}

And my test invokes thus:
    final StoreWicketTester wicketTester = new StoreWicketTester();




igor.vaynberg wrote:
> 
> for springwebapplication you are used to mean springwebapplicationfactory
> 
> -igor
> 
> 
> On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
>>
>> Hi,
>>
>> I have the same issue. If I use ZeuzGroupApplication.class I get the
>> known
>> issue of ClassCastException and  if I use the new ZeuzGroupApplication(),
>> I
>> get the following error. Any help will be greatly appreciated...
>>
>> Regards.
>>
>> java.lang.IllegalStateException: No WebApplicationContext found: no
>> ContextLoaderListener registered?
>>         at
>> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
>>         at
>> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
>>         at
>> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
>>         at
>> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
>>         at
>> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
>>         at
>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
>>         at
>> org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
>>
>>
>>
>> David Shepherdson-2 wrote:
>> >
>> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael wrote:
>> >
>> >> Ahh, that might just be it then.. I've just verified it. I guess I
>> >> used a too general session, as you wrote the stuff passes when using
>> >> websession. Im gonna close the bug.
>> >>
>> >> Thanks for your help.
>> >
>> > No probs -- glad there was a good explanation for it in the end!
>> >
>> > David
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14700186.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Igor Vaynberg <ig...@gmail.com>.
for springwebapplication you are used to mean springwebapplicationfactory

-igor


On Jan 8, 2008 2:01 PM, cricdigs <cr...@gmail.com> wrote:
>
> Hi,
>
> I have the same issue. If I use ZeuzGroupApplication.class I get the known
> issue of ClassCastException and  if I use the new ZeuzGroupApplication(), I
> get the following error. Any help will be greatly appreciated...
>
> Regards.
>
> java.lang.IllegalStateException: No WebApplicationContext found: no
> ContextLoaderListener registered?
>         at
> org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
>         at
> org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
>         at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
>         at
> org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
>         at
> org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
>         at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
>         at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
>
>
>
> David Shepherdson-2 wrote:
> >
> > On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael wrote:
> >
> >> Ahh, that might just be it then.. I've just verified it. I guess I
> >> used a too general session, as you wrote the stuff passes when using
> >> websession. Im gonna close the bug.
> >>
> >> Thanks for your help.
> >
> > No probs -- glad there was a good explanation for it in the end!
> >
> > David
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by cricdigs <cr...@gmail.com>.
Hi, 

I have the same issue. If I use ZeuzGroupApplication.class I get the known
issue of ClassCastException and  if I use the new ZeuzGroupApplication(), I
get the following error. Any help will be greatly appreciated...

Regards.

java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
	at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:86)
	at
org.apache.wicket.spring.SpringWebApplication.internalInit(SpringWebApplication.java:77)
	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:511)
	at
org.apache.wicket.protocol.http.MockWebApplication.<init>(MockWebApplication.java:148)
	at
org.apache.wicket.util.tester.BaseWicketTester.<init>(BaseWicketTester.java:204)
	at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:308)
	at org.apache.wicket.util.tester.WicketTester.<init>(WicketTester.java:291)
	

David Shepherdson-2 wrote:
> 
> On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael wrote:
> 
>> Ahh, that might just be it then.. I've just verified it. I guess I  
>> used a too general session, as you wrote the stuff passes when using  
>> websession. Im gonna close the bug.
>>
>> Thanks for your help.
> 
> No probs -- glad there was a good explanation for it in the end!
> 
> David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wickettester-and-session--tp14459864p14700073.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by David Shepherdson <da...@ontology-partners.com>.
On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael wrote:

> Ahh, that might just be it then.. I've just verified it. I guess I  
> used a too general session, as you wrote the stuff passes when using  
> websession. Im gonna close the bug.
>
> Thanks for your help.

No probs -- glad there was a good explanation for it in the end!

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Ahh, that might just be it then.. I've just verified it. I guess I used 
a too general session, as you wrote the stuff passes when using 
websession. Im gonna close the bug.

Thanks for your help.

David Shepherdson wrote:
> On 4 Jan 2008, at 12.18 pm, Nino Saturnino Martinez Vazquez Wael wrote:
>
>> I think we should proceed with the example from the jira issue, ive 
>> changed it to   :
>>
>> tester = new WicketTester(new WicketApplication());
>>
>> But it still gives the class cast exception.
>>
>> This is running 1.3.0 final.
>
> This seemed really weird, because I knew our test code was doing 
> something practically identical, and yet we weren't getting any 
> ClassCastExceptions. But sure enough, when I run your quickstart, it 
> gives a ClassCastException.
>
> I think I can see what the difference is, though: our custom session 
> class extends WebSession, whereas the one in the quickstart extends 
> Session.
>
> Indeed, this is supported by the ClassCastException message itself, 
> which suggests that something in MockWebApplication (the base class 
> for WicketTester, eventually) is trying to cast your CustomSession as 
> a WebSession. When I change the base class of CustomSession to be 
> WebSession instead, the test passes with no exceptions.
>
> Regards,
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


[wicket-security] LDAP integration?

Posted by William Hoover <wh...@nemours.org>.
Can wicket-security be used with LDAP? If so, are there any examples available demonstrating its use?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by David Shepherdson <da...@ontology-partners.com>.
On 4 Jan 2008, at 12.18 pm, Nino Saturnino Martinez Vazquez Wael wrote:

> I think we should proceed with the example from the jira issue, ive  
> changed it to   :
>
> tester = new WicketTester(new WicketApplication());
>
> But it still gives the class cast exception.
>
> This is running 1.3.0 final.

This seemed really weird, because I knew our test code was doing  
something practically identical, and yet we weren't getting any  
ClassCastExceptions. But sure enough, when I run your quickstart, it  
gives a ClassCastException.

I think I can see what the difference is, though: our custom session  
class extends WebSession, whereas the one in the quickstart extends  
Session.

Indeed, this is supported by the ClassCastException message itself,  
which suggests that something in MockWebApplication (the base class  
for WicketTester, eventually) is trying to cast your CustomSession as  
a WebSession. When I change the base class of CustomSession to be  
WebSession instead, the test passes with no exceptions.

Regards,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hmm had do make a method for switching out the context. But thats okay a 
minor thing. But I am still getting the class cast exception:

I think we should proceed with the example from the jira issue, ive 
changed it to   :

tester = new WicketTester(new WicketApplication());

But it still gives the class cast exception.

This is running 1.3.0 final.

I'll update the jira in a sec..


https://issues.apache.org/jira/browse/WICKET-1256



Nino Saturnino Martinez Vazquez Wael wrote:
> Eeek youre right. Why did I not see this earlier.. I'll fiddle a bit 
> with this and see if I can make it work without the wrapper...
>
> David Shepherdson wrote:
>> Hello Nino,
>>
>> On 4 Jan 2008, at 8.14 am, Nino Saturnino Martinez Vazquez Wael wrote:
>>
>>> Thanks for the response. I cant construct the application at that 
>>> point since I need to inject a spring context which might be 
>>> different from test to test. Sometimes you'll only want to run pure 
>>> ui tests and mock the database provider. other times you'll want to 
>>> run integration tests. Switching of context then becomes really handy.
>>
>> ...
>>
>>> But as you mentioned it is a application and not a start page. I've 
>>> also provided a simple quickstart that shows this behavior : 
>>> https://issues.apache.org/jira/browse/WICKET-1256
>>
>> But I think the problem is still that the constructor of WicketTester 
>> that takes in a class *isn't* taking in a class for the application, 
>> but for the application's home page. Looking at the code, it creates 
>> a new subclass of WebApplication that overrides the getHomePage() 
>> method to return the class you passed in. It doesn't do anything else 
>> with the class, so I can't see that passing in your application's 
>> class is going to be helpful unless you want the getHomePage() method 
>> to return your application's class for some reason.
>>
>> Effectively, the code looks like this (simplified):
>>
>>     public WIcketTester(final Class homePage)
>>     {
>>         this(new WebApplication()
>>         {
>>             public Class getHomePage()
>>             {
>>                 return homePage;
>>             }
>>         });
>>     }
>>
>> ...so there's no way I can see that the WebApplication it returns 
>> could know anything about your application's custom session class (or 
>> any other aspect of your application).
>>
>> If you can't construct the application then, and you can't delay the 
>> construction of the WicketTester until later (when you *are* able to 
>> construct the application) one approach would be to make a wrapper 
>> application class you could construct and pass into the WicketTester, 
>> which would have a method to construct an instance of your real 
>> application later on, when the necessary context is available -- in 
>> other words, something like:
>>
>>     WrapperApplication wrapperApp = new WrapperApplication();
>>     wicketTester = new WicketTester(wrapperApp);
>>
>>     // Later on, when the context is available.
>>     wrapperApp.setRealApp(new ZeuzGroupApplication(...));
>>
>> Writing the wrapper itself might be a bit messy, though, because 
>> presumably you'd need to trampoline everything in WebApplication (and 
>> Application) that might be called on your application, so I would 
>> suggest deferring the construction of the WicketTester until later on 
>> if at all possible.
>>
>> Hope this helps,
>>
>> David
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Eeek youre right. Why did I not see this earlier.. I'll fiddle a bit 
with this and see if I can make it work without the wrapper...

David Shepherdson wrote:
> Hello Nino,
>
> On 4 Jan 2008, at 8.14 am, Nino Saturnino Martinez Vazquez Wael wrote:
>
>> Thanks for the response. I cant construct the application at that 
>> point since I need to inject a spring context which might be 
>> different from test to test. Sometimes you'll only want to run pure 
>> ui tests and mock the database provider. other times you'll want to 
>> run integration tests. Switching of context then becomes really handy.
>
> ...
>
>> But as you mentioned it is a application and not a start page. I've 
>> also provided a simple quickstart that shows this behavior : 
>> https://issues.apache.org/jira/browse/WICKET-1256
>
> But I think the problem is still that the constructor of WicketTester 
> that takes in a class *isn't* taking in a class for the application, 
> but for the application's home page. Looking at the code, it creates a 
> new subclass of WebApplication that overrides the getHomePage() method 
> to return the class you passed in. It doesn't do anything else with 
> the class, so I can't see that passing in your application's class is 
> going to be helpful unless you want the getHomePage() method to return 
> your application's class for some reason.
>
> Effectively, the code looks like this (simplified):
>
>     public WIcketTester(final Class homePage)
>     {
>         this(new WebApplication()
>         {
>             public Class getHomePage()
>             {
>                 return homePage;
>             }
>         });
>     }
>
> ...so there's no way I can see that the WebApplication it returns 
> could know anything about your application's custom session class (or 
> any other aspect of your application).
>
> If you can't construct the application then, and you can't delay the 
> construction of the WicketTester until later (when you *are* able to 
> construct the application) one approach would be to make a wrapper 
> application class you could construct and pass into the WicketTester, 
> which would have a method to construct an instance of your real 
> application later on, when the necessary context is available -- in 
> other words, something like:
>
>     WrapperApplication wrapperApp = new WrapperApplication();
>     wicketTester = new WicketTester(wrapperApp);
>
>     // Later on, when the context is available.
>     wrapperApp.setRealApp(new ZeuzGroupApplication(...));
>
> Writing the wrapper itself might be a bit messy, though, because 
> presumably you'd need to trampoline everything in WebApplication (and 
> Application) that might be called on your application, so I would 
> suggest deferring the construction of the WicketTester until later on 
> if at all possible.
>
> Hope this helps,
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by David Shepherdson <da...@ontology-partners.com>.
Hello Nino,

On 4 Jan 2008, at 8.14 am, Nino Saturnino Martinez Vazquez Wael wrote:

> Thanks for the response. I cant construct the application at that  
> point since I need to inject a spring context which might be  
> different from test to test. Sometimes you'll only want to run pure  
> ui tests and mock the database provider. other times you'll want to  
> run integration tests. Switching of context then becomes really handy.

...

> But as you mentioned it is a application and not a start page. I've  
> also provided a simple quickstart that shows this behavior : https://issues.apache.org/jira/browse/WICKET-1256

But I think the problem is still that the constructor of WicketTester  
that takes in a class *isn't* taking in a class for the application,  
but for the application's home page. Looking at the code, it creates a  
new subclass of WebApplication that overrides the getHomePage() method  
to return the class you passed in. It doesn't do anything else with  
the class, so I can't see that passing in your application's class is  
going to be helpful unless you want the getHomePage() method to return  
your application's class for some reason.

Effectively, the code looks like this (simplified):

     public WIcketTester(final Class homePage)
     {
         this(new WebApplication()
         {
             public Class getHomePage()
             {
                 return homePage;
             }
         });
     }

...so there's no way I can see that the WebApplication it returns  
could know anything about your application's custom session class (or  
any other aspect of your application).

If you can't construct the application then, and you can't delay the  
construction of the WicketTester until later (when you *are* able to  
construct the application) one approach would be to make a wrapper  
application class you could construct and pass into the WicketTester,  
which would have a method to construct an instance of your real  
application later on, when the necessary context is available -- in  
other words, something like:

     WrapperApplication wrapperApp = new WrapperApplication();
     wicketTester = new WicketTester(wrapperApp);

     // Later on, when the context is available.
     wrapperApp.setRealApp(new ZeuzGroupApplication(...));

Writing the wrapper itself might be a bit messy, though, because  
presumably you'd need to trampoline everything in WebApplication (and  
Application) that might be called on your application, so I would  
suggest deferring the construction of the WicketTester until later on  
if at all possible.

Hope this helps,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hi David

Thanks for the response. I cant construct the application at that point 
since I need to inject a spring context which might be different from 
test to test. Sometimes you'll only want to run pure ui tests and mock 
the database provider. other times you'll want to run integration tests. 
Switching of context then becomes really handy.

I am doing it like this :

        AnnotApplicationContextMock appctx = new 
AnnotApplicationContextMock();
        appctx.putBean("dBDao", dbProvider);

        wicketTester = new WicketTester(ZeuzGroupApplication.class);
       
        WebApplication app = wicketTester.getApplication();

        app.addComponentInstantiationListener(new 
SpringComponentInjector(app,
                appctx));


But as you mentioned it is a application and not a start page. I've also 
provided a simple quickstart that shows this behavior : 
https://issues.apache.org/jira/browse/WICKET-1256

However that does not show the part where I inject via spring as it's 
meant to be simple..

If you want to see a full fledged example look here at this svn : 
http://svn2.assembla.com/svn/wicketSpringJPAHibernateTut

However I havent written a test that displays the session problem for 
this project though.

regards Nino


David Shepherdson wrote:
> On 21 Dec 2007, at 6.03 pm, Nino Saturnino Martinez Vazquez Wael wrote:
>
>> There seems to be a problem with wicket tester and the session 
>> created (I use my own custom session). I create the wicket tester 
>> like this:
>
> ...
>
>>       wicketTester = new WicketTester(ZeuzGroupApplication.class);
>
> ...
>
>> The application works fine without testing. But I get a class cast 
>> exception when testing, since the session arent my custom one,
>
> We also have our own custom session class, and our version of 
> newSession() looks practically identical to yours.
>
> However, when we construct the WicketTester, we construct our 
> application too, rather than passing in a class name -- something like:
>
>     wicketTester = new WicketTester(new ZeuzGroupApplication());
>
> ...and we're not seeing any ClassCastExceptions -- the session being 
> constructed is definitely our custom class.
>
> From the look of the JavaDoc/code for WIcketTester, the constructor 
> that takes in a Class is expecting that to be the class of the 
> application's home page, *not* the application itself; it constructs a 
> WebApplication to wrap the home page in and uses that. Is it possible, 
> therefore, that you're mistakenly calling the wrong constructor?
>
> Alternatively, if ZeuzGroupApplication really is a page class (and not 
> an application), I would say that your best bet would be to construct 
> the WicketTester with an application instance, as in  my example 
> above, and then use the tester's startPage(Class) method to test your 
> page.
>
> David Shepherdson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wickettester and session?

Posted by David Shepherdson <da...@ontology-partners.com>.
On 21 Dec 2007, at 6.03 pm, Nino Saturnino Martinez Vazquez Wael wrote:

> There seems to be a problem with wicket tester and the session  
> created (I use my own custom session). I create the wicket tester  
> like this:

...

>       wicketTester = new WicketTester(ZeuzGroupApplication.class);

...

> The application works fine without testing. But I get a class cast  
> exception when testing, since the session arent my custom one,

We also have our own custom session class, and our version of  
newSession() looks practically identical to yours.

However, when we construct the WicketTester, we construct our  
application too, rather than passing in a class name -- something like:

     wicketTester = new WicketTester(new ZeuzGroupApplication());

...and we're not seeing any ClassCastExceptions -- the session being  
constructed is definitely our custom class.

 From the look of the JavaDoc/code for WIcketTester, the constructor  
that takes in a Class is expecting that to be the class of the  
application's home page, *not* the application itself; it constructs a  
WebApplication to wrap the home page in and uses that. Is it possible,  
therefore, that you're mistakenly calling the wrong constructor?

Alternatively, if ZeuzGroupApplication really is a page class (and not  
an application), I would say that your best bet would be to construct  
the WicketTester with an application instance, as in  my example  
above, and then use the tester's startPage(Class) method to test your  
page.

David Shepherdson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org