Hi Martijn,

Thanks for the tips.

Martijn Dashorst wrote:
When you embark on your bookmarkable paging navigator remember that
you have to take into account 2 or 3 navigators on a page, how do you
keep them apart? Or how do you encode sorting? URL state is a really
tricky thing.

This is indeed the trickiest part of the whole endeavor. There will need to be a way to specify which state is relevant and how to map it to parameters. It's not that difficult though: generally the method parameters passed to the DAO to retrieve the list are all that is necessary to recreate the list (albeit not exactly).

Besides, the paging navigator itself is quite non-interesting to
bookmark. How often have you bookmarked a page from a search result in
google? Why is it important to be able to bookmark page 21 of your
product catalogue? How will that help if the sorting changes? Or if 20
new products are added to your catalogue?

Well I agree with you that it's totally uninteresting to bookmark (though in your WIA book you use a bookmark to the second page of the google search results for wicket yourself ;-)))).

But bookmarking the page is totally beside the point. There are 2 issues that I want to address:

1) being able to communicate the link to a friend ("hey look at this!")

2) not having pages expire when they don't have to ("I just went to have lunch, then went to the next page of comments, and the site crashed!"). In many cases it is justified to have a page expire, but in many cases I think it's more important that the page "just works" than to be able to reproduce exactly the correct page again. (In fact, in many cases this trade-off is already made anyway, because even WITHIN the session if you go to the next page it may be different than expected due the 20 new products in the catalogue).

Make sure the results in your listview are bookmarkable.

I don't quite understand what you mean here. For example, in a guestbook, you want the individual comments to be bookmarkable? That is certainly a good idea, but are you suggesting that it then jumps to whatever page contains that comment, or that I create a special "single comment" page to view it? Because the latter would have little to do with a paging navigation component, it would be part of the item markup.

Kind regards,
Sebastiaan


Martijn

On 9/11/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
I have exactly the same issue, and was thinking of writing a special
PageNavigation to do the job for me. Many times the only relevant state
is the page number (and possibly the filter used).

The use case (which I think occurs very often) is a list of comments in
a guestbook or blog, or the list of products in shop, etc... The list
will change only very infrequently (item added or removed, in the case
of blogs, possibly only at the end). Users however want to paste links
to each other via IM, and they certainly don't want the page to expire
on them (prev on a guestbook page suddenly says Page Expired? - users
won't understand, and personally I'd think it's a poor implementation if
that happened to me).

The current PageNavigation does not seem very easy to modify
unfortunately. Overriding it to return other links is a possible, but I
saw lots of logic in the default links (PagingNavigationLink and
PaginagNavigationIncrementLink) it returns (which are subclasses of
Link). If you want to make them subclasses of BookMarkablePageLink then
you have to copy paste a lot of functionality. :-(

Anyway, I'll be looking into this probably this weekend, and if I get
something working I'll post it to the list. Any suggestions as to the
best approach are welcome though. :-)

Regards,
Sebastiaan

Johan Karlberg wrote:
The page versions will not be bookmarkable since they rely on serverside
state that obviosuly cannot be retained forever, nor shared with another
session. To make a basepage boomarkable, make our navigation links
bookmarkable. (there is a BookmarkableLink in the API), if you want
pages with state to be bookmarkable, the relevant state needs to be
encoded in the URL and passed with PageParameters I believe.

Johan

chickabee wrote:
Yes, Now the urls are like:
https://lilo:8443/whisky/app/plist/.1.2
https://lilo:8443/whisky/app/plist/.1.3  ...etc...these are much
better than
earlier. thx.

However, they are not bookmarkable, if I start the new browser and
point the
folloing url:
https://lilo:8443/whisky/app/plist/.1.3

It always takes me to the first page, How do i make these navigated
urls bookmarkable as well?

thanks,


Johan Karlberg wrote:
In your application class's init method, mount the page with an
appropriate URL strategy. I have mounts like these in my current code.

mount(new HybridUrlCodingStrategy("/plist", PlistPage.class));

Johan

chickabee wrote:
I have the nice url:
https://lilo:8443/whisky/app/plist/

When I go to the next page using the page navigator then the url
becomes:
https://lilo:8443/whisky/app/?wicket:interface=:16:1:::

When I go to next page again  then the url becomes:
https://lilo:8443/whisky/app/?wicket:interface=:16:2:::

How do I make these Page Navigated Urls Nicer, for example:
https://lilo:8443/whisky/app/plist/page/1
https://lilo:8443/whisky/app/plist/page/2

Any pointer in right direction is appreciated, Thanks in advance.
---------------------------------------------------------------------
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]




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to