Hi Johan,
Thank you for the reply.
This suggestion will work, but it seems like something that the framework
should do automatically. The whole "maintaining" state thing is meant to
maintain state between requests without the extra dev overhead of manually
plugging stuff into, and pulling out of the session. I'm happy to get a new
instance of the page if its been cleansed from the session - thats not a
problem, but I was under the impression that wicket should already be
maintaining this state - I just need a link generated.
I find it a bit bizarre that methods like Page.getVersion(int num) exist,
but because its not static.. i need an instance of the page to retrieve a
previously versioned instances of the page. (rather than
Page.getVersion(Class clazz, int version)).
Does wicket not support linking to the last version of a given class type?
If not, I would find this quite useful.
Something like
new PageLink("search-criteria-link", SearchCriteriaPage.class,
Page.LATEST_VERSION)
Would be exactly what I'm after. (I'm still optimistic that this feature
exists and its me being stupid not able to find it. ;))
Rgds
Ned
Johan Compagner wrote:
>
> Just remember in a simple valuesholder class the page id and pagmap
> for a page (and version if you want that) and then ask through the
> session for that page. If many pages (or big pages) are created in
> between, it could return nothing.. Depending on the size of the
> diskpage session/pagmap file.
>
--
View this message in context:
http://www.nabble.com/Link-to-last-version-of-a-page-of-a-given-type-class.-tp14994042p14994505.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]