Hi Elke, On Fri, Oct 1, 2010 at 8:34 AM, Eike Kettner <n...@eknet.org> wrote:
> Hello! > > I developed a wicket app using OSGi (felix) where different bundles may > contribute content to the wicket bundle. It works really nice using > wicket 1.4.9+. Now I want to upgrade to wicket 1.5 and I run in problems > starting the osgi container. > > It complains with the good-known classnotfound-exception for classes > like IClusterable and AuthenticatedWebapplication which all are classes > in packages exported by more than one bundle (for example > org.apache.wicket or org.apache.wicket.authentication). Earlier I found > this was a problem or at least a "not-good" for OSGi bundles. But as am > using OSGi 4.2 this may work with some special treatment (I'v never > tried this though). Do you think I'm doing something wrong or is this > something on the road for 1.5? > I don't have much experience with OSGi so can you give more details what exactly is the problem ? I think there is no difference in these two classes between 1.4.x and 1.5.x. They are packed the same way. There is no difference in the bnd-maven-plugin configuration as well. If you can find where the problem comes from then we can improve it. > > Also, since I have implemented ..UrlCodingStrategy and a custom > RequestTarget I'm studying the new request handling in 1.5 sources to > find out where to "plugin" my stuff. Are there any documentation besides > source and javadoc for the new concepts? The code is good to read but if > there are some pictures and text available it would be of great help. > Unfortunately there is other documentation yet. The idea is: with application.getRootRequestMapperAsCompound().add(myMapper) you can add a IRequestMapper to the list of mappers. When a request comes Wicket asks all registered mappers whether they are able to process the request. Mappers with bigger org.apache.wicket.request.IRequestMapper.getCompatibilityScore(Request) are asked first. So Wicket calls org.apache.wicket.request.IRequestMapper.mapRequest(Request) for each mapper and if it returns non-null IRequestHandler then this is the handler which will be used. In #mapRequest(Request) use have to check request's segments (this is similar to httpServletRequest#getPath()) and request's parameters (get and post) and decide whether they match to your logic. After the handling of the request (org.apache.wicket.request.IRequestHandler.respond(IRequestCycle)) Wicket will ask the mapper to create a Url which will be used for all urlFor() calls, i.e. to create the urls for all links, form action, etc. via org.apache.wicket.request.IRequestMapper.mapHandler(IRequestHandler) There are IRequestMapper implementations for all url coding strategies from 1.4.x so you can use them as examples. Let us know if you need more help. > > Thanks in advance! > Eike > > martin-g > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >