Finalizing the ExtendedPackageMapper. Usage is as follows: mount(new ExtendedPackageMapper("${username}/${group}", Info.class) { List<String> VALID_USERS = Arrays.asList(new String[] { "foo", "bar", "fizz", "buzz" });
@Override protected boolean validateParameters(PageParameters parameters) { String username = parameters.get("username").toString(); String group = parameters.get("group").toString(); return group.equals("admin") && VALID_USERS.contains(username); } }); Info.class is the default webpage for that package (in case user types only "/fizz/admin"); *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Fri, Aug 12, 2011 at 3:56 AM, Bruno Borges <bruno.bor...@gmail.com>wrote: > Attatched a version that works nicely. Although I haven't tested it yet > with forms, ajax and other things. > > This version translates nicely : > ${profile}/Page ==> packageName/Page?username=${profile} > > And vice-versa > > But I still have to consider extra parameters and Wicket-related > parameters. > > So this thread remains open. :-) Feel free to contribute. > > *Bruno Borges* > www.brunoborges.com.br > +55 21 76727099 > > > > On Fri, Aug 12, 2011 at 3:27 AM, Bruno Borges <bruno.bor...@gmail.com>wrote: > >> Attached a quickstart with this case working, but using Redirect to the >> real mountPackage. >> >> Not exactly what I'm looking for... >> >> *Bruno Borges* >> www.brunoborges.com.br >> +55 21 76727099 >> >> >> >> On Fri, Aug 12, 2011 at 2:43 AM, Igor Vaynberg >> <igor.vaynb...@gmail.com>wrote: >> >>> if you create a quickstart that people can play with you will get a >>> lot more responses... >>> >>> -igor >>> >>> On Thu, Aug 11, 2011 at 10:38 PM, Bruno Borges <bruno.bor...@gmail.com> >>> wrote: >>> > Hi all, >>> > >>> > I've digged into PackageMapper and CryptoMapper trying to achieve a >>> > Mapper based on user defined URLs, but honestly, it is not easy (at >>> least >>> > for me). >>> > >>> > The goal is to provide access to pages in package com.mysite.profile >>> > (pages: Guests, Messages, Wall, Home, etc) through a root path with >>> user >>> > name like: >>> > >>> > http://mysite.com/${username}/Guests >>> > >>> > And, one user may open as several tabs as he wants, each for different >>> user. >>> > Links should also be easily provided between pages beneath that path. >>> > >>> > One workaround came to mind: >>> > >>> > - loop through user database and mountPackage for each username >>> > >>> > But this seems a little odd to do, so that's why I came to the list. >>> > >>> > Anybody with a suggestion? >>> > >>> > *Bruno Borges* >>> > www.brunoborges.com.br >>> > +55 21 76727099 >>> > >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >