Having the link be both bookmarkable and having that object in the URL
without persisting seems largely contradictory.  Relying on having the
object in the session also reduces the effect of making it bookmarkable.
The only option I see for making it really bookmarkable (stateless) is
serializing the object to the URL string and deserializing in the page
constructor.  And that's kinda ugly.

On 9/20/07, Flavius <[EMAIL PROTECTED]> wrote:
>
>
>
> If I pass the id, I have to persist the filter someplace, like
> the session.  I try to avoid putting things on the session
> since it inhibits performance of session replication in a clustered
> environment.
>
> If I could get to the requestCycle when the link is clicked, it seems
> like I could pass it along the request.  But the BookmarkablePageLink
> doesn't have an onClick() event.
>
> Thinking out loud, it seems like if there were parameters that were
> "bookmarkable" (e.g. included in the built url), and others
> that were not (passed along, but not part of the generated url).
>
> Maybe that's something that could be done on a custom RequestCycle.
> Or maybe it's not so bad having the obj on the session.  :-)
>
>
>
> Evan Chooly wrote:
> >
> > 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]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12802323
> 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