It's been a while since I used TabbedPanel, so I could be wrong, but I think
you could accomplish something very similar to what you are requesting this
way:
final PageParameters params = getPageParameters();
TabbedPanel tp = new TabbedPanel("id", tabs) {
private static final long serialVersionUID = 1L;
@Override
protected WebMarkupContainer newLink(String linkId, int index) {
PageParameters tabParams = new PageParameters(params);
tabParams.remove("tabName");
tabParams.add("tabName", "your-tab-name");
return new BookmarkablePageLink(linkId, getPage().getClass(),
tabParams);
}
};
tp.setSelectedTab(getIndexForTab(getPageParameters().getString("tabName")));
This would result in the tabname not being colon-delimited as you show, but
instead being a query parameter. Depending on the URL strategy you are
using, that might be /tabName/foo or ?tabName=foo
Obviously, you would need to implement getIndexForTab yourself based on the
tabs you create.
Hope this helps.
--
Jeremy Thomerson
http://www.wickettraining.com
On Wed, Nov 12, 2008 at 7:46 AM, Matej Knopp <[EMAIL PROTECTED]> wrote:
> This is not possible to do with Wicket unless you have each tab on
> different page.
>
> -Matej
>
> On Wed, Nov 12, 2008 at 12:46 AM, rmoskal <[EMAIL PROTECTED]> wrote:
> >
> > I'm familiar with the a lot of the strategies that make for nicer urls in
> > Wicket, but am at a loss for how to make the urls for a tabpanel
> friendlier.
> >
> > Instead of /Home:1:1, /Home:2:1, etc.
> >
> > I'd like to have /Home:Account:1, /Home:Alerts:1, etc.
> >
> > It would be nice to lose the last bit on the right, but I could live with
> it
> > if it messes with wickets state maintaining ability.
> >
> > Has anyone had a client pester them for this?
> >
> > Thanks and regards,
> >
> > Robert Moskal
> > Brooklyn, USA
> > --
> > View this message in context:
> http://www.nabble.com/Pretty-url-for-tabs-tp20451052p20451052.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>