You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vladimir Kovalyuk <ko...@gmail.com> on 2009/07/25 17:55:55 UTC

how to create a BookmarkablePageLink for the particular page instance

I created a breadcrumbs panel that automatically creates a series of
bookmarkable links from the home page to the page that displays a details of
currently viewing entity instance.
Usually it looks like for instance home|folders|folder1|folder1.1|document

>From the other hand when the user comes to this particular document by
opening folders and then the document itself she produces a page versions
that makes page history. There is an button "back" or "close" on the page
that returns the user to the previous page in the history.

As the result breadcrumbs and history forms two different ways of navigation
but they both are natural and required.

The problem is that clicking on the particular link in breadcrumb panel
leads to creating a new version of page. I use HybridUrlCodingStrategy and
it seems pretty possible to add version attributes to the url. But I don't
know how to do it in compatible manner. It seems that the only link that
forms the bookmarkable URL using hybrid strategy is the
BookmarkablePageLink. But it does not accept anything from the particular
page version.

Please help

Re: how to create a BookmarkablePageLink for the particular page instance

Posted by Vladimir K <ko...@gmail.com>.
Certainly, parameters are just name of object class and object code/id.
But actually I'm saying that I can create store PageReference with its
related PageParametes in session and using PageParameters from the request
to obtain a Page instance from page store.
The only thing I'm not sure is the lifecycle of values in such a cache.

AFAK overriding page factory is the only way how to make a page singleton in
the session. There are plenty of pages that should behave as singleton.
There would be the other way if it was easy to split Tree and its DYNAMIC
state. Unfortunately tree is very difficult in restoring its state.

The user don't want to expand tree items every time she has to return back
to the page.


Alexandru Objelean wrote:
> 
> If you can restore the page state from passed PageParameters, then it is
> doable...
> 
> Alex Objelean
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-create-a-BookmarkablePageLink-for-the-particular-page-instance-tp24659102p24659535.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to create a BookmarkablePageLink for the particular page instance

Posted by Alex Objelean <al...@yahoo.com>.
If you can restore the page state from passed PageParameters, then it is
doable...

Alex Objelean


Vladimir K wrote:
> 
> It seems that I can override page factory in session and re-use existing
> page basing on the parameters values.
> 
> 
> Alexandru Objelean wrote:
>> 
>> Bookmarkable page doesn't have state and can be created using
>> PageParameters. Each request for a bookmarkable page will cause a
>> creation of new instance of that page. In your case, if the page instance
>> have some state (is session relative), then there is no way to create a
>> bookmarkable link for it.
>> 
>> Alex Objelean 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-create-a-BookmarkablePageLink-for-the-particular-page-instance-tp24659102p24659430.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Serialization of a page with a long and dynamic list of records

Posted by Vladimir K <ko...@gmail.com>.
I realized that it is not possible to support bookmarkable page links in
breadcrumbs panel for already instantiated pages because it won't work with
multiple browser windows and tabls.

Therefore I can use bookmarkable links for non-instantiated pages only. It
can be easily accomplished with existing components. Hmm ... wrong word. ...
EASIER than overriding page factory.
-- 
View this message in context: http://www.nabble.com/how-to-create-a-BookmarkablePageLink-for-the-particular-page-instance-tp24659102p24662729.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Serialization of a page with a long and dynamic list of records

Posted by Alex Objelean <al...@yahoo.com>.
This question is not related to the subject of the topic. 
Anyway, the answer for you question is: 
- if you are using LoadableDetachableModel, then the list is not serialized
with each request... this is the main feature of this type of model, it
detaches its data at the end of each request cycle.

Alex Objelean 


David Chang-5 wrote:
> 
> 
> I am learning and evaluating Wicket now and have a question to ask.
> 
> I have a page that displays a long list (say 2000) of records. This page
> is dynamic, which means the list of records may change for each reload. I
> understand that I should use loadable detachable model. My question is:
> does Wicket serialize each page reload with all the records on a
> particular reload?
> 
> Thanks!
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-create-a-BookmarkablePageLink-for-the-particular-page-instance-tp24659102p24661437.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Serialization of a page with a long and dynamic list of records

Posted by David Chang <da...@yahoo.com>.
I am learning and evaluating Wicket now and have a question to ask.

I have a page that displays a long list (say 2000) of records. This page is dynamic, which means the list of records may change for each reload. I understand that I should use loadable detachable model. My question is: does Wicket serialize each page reload with all the records on a particular reload?

Thanks!


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to create a BookmarkablePageLink for the particular page instance

Posted by Vladimir K <ko...@gmail.com>.
It seems that I can override page factory in session and re-use existing page
basing on the parameters values.


Alexandru Objelean wrote:
> 
> Bookmarkable page doesn't have state and can be created using
> PageParameters. Each request for a bookmarkable page will cause a creation
> of new instance of that page. In your case, if the page instance have some
> state (is session relative), then there is no way to create a bookmarkable
> link for it.
> 
> Alex Objelean 
> 
> 
> Vladimir K wrote:
>> 
>> I created a breadcrumbs panel that automatically creates a series of
>> bookmarkable links from the home page to the page that displays a details
>> of
>> currently viewing entity instance.
>> Usually it looks like for instance
>> home|folders|folder1|folder1.1|document
>> 
>> From the other hand when the user comes to this particular document by
>> opening folders and then the document itself she produces a page versions
>> that makes page history. There is an button "back" or "close" on the page
>> that returns the user to the previous page in the history.
>> 
>> As the result breadcrumbs and history forms two different ways of
>> navigation
>> but they both are natural and required.
>> 
>> The problem is that clicking on the particular link in breadcrumb panel
>> leads to creating a new version of page. I use HybridUrlCodingStrategy
>> and
>> it seems pretty possible to add version attributes to the url. But I
>> don't
>> know how to do it in compatible manner. It seems that the only link that
>> forms the bookmarkable URL using hybrid strategy is the
>> BookmarkablePageLink. But it does not accept anything from the particular
>> page version.
>> 
>> Please help
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-create-a-BookmarkablePageLink-for-the-particular-page-instance-tp24659102p24659419.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: how to create a BookmarkablePageLink for the particular page instance

Posted by Alex Objelean <al...@yahoo.com>.
Bookmarkable page doesn't have state and can be created using PageParameters.
Each request for a bookmarkable page will cause a creation of new instance
of that page. In your case, if the page instance have some state (is session
relative), then there is no way to create a bookmarkable link for it.

Alex Objelean 


Vladimir K wrote:
> 
> I created a breadcrumbs panel that automatically creates a series of
> bookmarkable links from the home page to the page that displays a details
> of
> currently viewing entity instance.
> Usually it looks like for instance home|folders|folder1|folder1.1|document
> 
> From the other hand when the user comes to this particular document by
> opening folders and then the document itself she produces a page versions
> that makes page history. There is an button "back" or "close" on the page
> that returns the user to the previous page in the history.
> 
> As the result breadcrumbs and history forms two different ways of
> navigation
> but they both are natural and required.
> 
> The problem is that clicking on the particular link in breadcrumb panel
> leads to creating a new version of page. I use HybridUrlCodingStrategy and
> it seems pretty possible to add version attributes to the url. But I don't
> know how to do it in compatible manner. It seems that the only link that
> forms the bookmarkable URL using hybrid strategy is the
> BookmarkablePageLink. But it does not accept anything from the particular
> page version.
> 
> Please help
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-create-a-BookmarkablePageLink-for-the-particular-page-instance-tp24659102p24659329.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org