Put the Filter ID in the map.

On 9/18/07, Flavius <[EMAIL PROTECTED]> wrote:
>
>
> I have two pages, a list page and a detail.  The list page
> can take a filter parameter, or has a default one if one
> is not passed (making it bookmarkable).  When the user
> clicks to go to the detail page, I want to pass that
> filter along, so that when an edit is complete, the
> page can redirect back to the list page with the same
> filter intact.  I also want the detail page to be bookmarkable.
>
> If the detail page gets the filter, it simply passes it back.  If
> not, that's fine too.
>
> I can accomplish this easily by creating a PageParameters:
>
> PageParameters parameters = new PageParameters();
> parameters.put("filter", filter);
>
> BookmarkablePageLink link = new BookmarkablePageLink(name,
> MyDetailPage.class, parameters);
>
> And this works fine.  But I don't like the way
> the URL is created like this:
>
>
> http://localhost/pages/MyDetailPage/item/20/filter/com.foo.bar.Filter%401ae6456/
>
> If the page is bookmarked, the Filter obj doesn't matter anyway.
> I understand why it's there, I'm just trying to figure out a prettier URL,
> like
> when I pass a parameter on the requestCycle, setting the response page
> and passing the parameters obj in there.
>
> I've thought of overriding the onClick event for BookmarkablePageLink, but
> it's final.  Another option was to pass it on the request or the session.
> That
> would be the last option.
>
> Any insight would be appreciated.
>
>
> --
> View this message in context:
> http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12770252
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to