Re: Passing Parameters to Bookmarkable Page

2007-09-25 Thread Eelco Hillenius
> If the page is bookmarked, I don't care about retaining the filter.
> I just want the id for the item they want to view.  But if they
> clicked the link from the list page (that has a list based on the filter),
> then when they return to the list page (save, cancel), I want
> to pass the filter back.
>
> The target page looks for the filter and simply passes it back.  if
> there's nothing there, it passes nothing back.

I would actually be nice to be able to explicitly set a URL together
with the redirect to buffer strategy. For the buffer, it doesn't
really matter what the URL looks like, and with this you'd be able to
pass internal state to pages while still keeping your locations
bookmarkable.

You could open a feature request for this. Maybe supply a patch?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing Parameters to Bookmarkable Page

2007-09-20 Thread Flavius


If the page is bookmarked, I don't care about retaining the filter.
I just want the id for the item they want to view.  But if they
clicked the link from the list page (that has a list based on the filter),
then when they return to the list page (save, cancel), I want
to pass the filter back.

The target page looks for the filter and simply passes it back.  if
there's nothing there, it passes nothing back.



Evan Chooly wrote:
> 
> 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]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12803086
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Passing Parameters to Bookmarkable Page

2007-09-20 Thread Evan Chooly
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]
>
>


Re: Passing Parameters to Bookmarkable Page

2007-09-20 Thread Flavius


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]



Re: Passing Parameters to Bookmarkable Page

2007-09-20 Thread Evan Chooly
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]
>
>


Re: Passing Parameters to Bookmarkable Page

2007-09-19 Thread chickabee

It seems like in:
parameters.put("filter", filter);

the filter object is the instance of com.foo.bar.Filter class, I guess if
you implement toString() correctly within this object that might help, also
instead of com.foo.bar.Filter object,  try supplying a String as an
alternate,

Good luck.




Flavius 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#a12780685
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]