Hmm.. There is one more thing. I know it's probably going to be against
your don't touch internal policy but...
Do you think it might be possible in future to make wicket use user
specified implementation of MostRecentlyUsedMap? I think it would be
great if user could implement his own policy of removing expired page
if the standart policy is not sufficient.
So in PageMap.java there wouldn't be
if (this.pages == null)
{
this.pages = new
MostRecentlyUsedMap(session.getApplication().getSettings()
.getMaxPages());
}
but something more like
if (this.pages == null)
{
this.pages = new session.getApplication().getSettings
().getMostRecentlyUsedMapClass ().newInstance ();
}
This would make possible to implement my own policy (with sticky pages
or whatever else), while wicket could still give the default implementation.
Jonathan Locke wrote:
cause maybe what we need is something more like a randomly assigned
value for default page map name.
if you go to a bookmarkable page without a pagemap value in your query
string, we could assign a random one
like pageMap=82912314 or something. then that gets carried through
every request. this might take care of
the new browser window problem without any of this
expiration/pagemap/lru business...
Jonathan Locke wrote:
btw, why is this a problem? is it new browser windows? because
popups and frames should work fine with pagemaps...
Matej Knopp wrote:
I'm not quite sure. What if user opened 10 different edit pages and
all of them would have isExpirable() returning false?
Would it mean that no other pages could be placed in pagemap?
I think that this could be a working solution, if the number of
"sticky" pages could be set to (for example) 5 and the oldest sticky
pages would be dumped in favour of new sticky (unexpirable) pages, so
that the whole pagemap wouldn't get filled with unexpirable pages.
Jonathan Locke wrote:
would it be okay to have a virtual method like
EditPage.isExpirable() { return false; }
?
i think this expresses what you want in a better way.
Matej Knopp wrote:
Okay, I won't touch it :)
Only thing I want to do is to say that all pages of class EditPage
will be in different pagemap than other pages. That all. I don't
really want
to mess with pagemap internals.
Jonathan Locke wrote:
do not do this.
there's something you missed at the top of the file PageMap.java:
THIS CLASS IS NOT PART OF THE WICKET PUBLIC API. DO NOT ATTEMPT TO
USE IT.
pagemaps are not intended to be manipulated by end users. they
are an internal datastructure.
it could be that we should make as many of the methods package
private as well to prevent
this kind of usage...
the intended usage of pagemaps is that they are automatically
maintained by the framework. you start a pagemap for a frame or
popup and then you forget about it.
Igor Vaynberg wrote:
You can do getSession().getPageMap("edit").put(this) from your
edit pages.
Igor
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Matej Knopp
Sent: Thursday, June 30, 2005 5:10 PM
To: [email protected]
Subject: [Wicket-user] Specify pagemap for page class
Hi
Is there any way to specify the pagemap name for certain page
class/instance? I know there's a pageMap query parameter for
bookmarkable
page but that does not seem sufficient for me.
I'd like to know if I can somehow specify, that for example all
pages of
class EditPage would be placed in "edit" pagemap, white all other
pages
would be placed in default pagemap.
The EditPage instances will not be created using bookmarkable
links so the
pageMap attribute can't be used. The setPageMap function of page
is marked
as internal (so I'm not supposed to use it).
Thank you.
-Matej Knopp
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies from
IBM. Find simple to follow Roadmaps, straightforward articles,
informative
Webcasts and more! Get everything you need to get up to speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user