Re: HybridURLs

2008-08-01 Thread Uwe Schäfer

Matej Knopp schrieb:

hi matej


mount the page using HybridUrlCodingStrategy.


i already did.


The url for page instance (you can use PageLink for that) will than look
like /foo/document/21.5 (where .5 denotes page instance). Note that
such url *is* bookmarkable, the page instance number doesn't matter.


when navigating on the page, everything works like expected when coming 
with a bookmarkablepagelink, adding the parameter document=21.


but, how to get the parameters AND the state in the link ?

what i see is pagelink, that does not help me using parameters and
bookmarablepagelink that does not give me the opportunity to add state.

i suppose what i´d need is a constructor like
BookmarkablePageLink(String id, Page page, PageParameters parameters) ?

cu uwe

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



Re: HybridURLs

2008-08-01 Thread Martijn Dashorst
you have to encode the necessary state yourself into the page
parameters. There is no way for Wicket to be able how to serialize the
state in the URL in some magic way.

Martijn

On Fri, Aug 1, 2008 at 9:41 AM, Uwe Schäfer [EMAIL PROTECTED] wrote:
 Matej Knopp schrieb:

 hi matej

 mount the page using HybridUrlCodingStrategy.

 i already did.

 The url for page instance (you can use PageLink for that) will than look
 like /foo/document/21.5 (where .5 denotes page instance). Note that
 such url *is* bookmarkable, the page instance number doesn't matter.

 when navigating on the page, everything works like expected when coming with
 a bookmarkablepagelink, adding the parameter document=21.

 but, how to get the parameters AND the state in the link ?

 what i see is pagelink, that does not help me using parameters and
 bookmarablepagelink that does not give me the opportunity to add state.

 i suppose what i´d need is a constructor like
 BookmarkablePageLink(String id, Page page, PageParameters parameters) ?

 cu uwe

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: HybridURLs

2008-08-01 Thread Matej Knopp
Page remembers the original page parameters with which it has been
created. So when you use PageLink (with an existing page instance) the
parameters will be there.

If you want to change the parameters you can try Page#getPageParameters().

-Matej

On Fri, Aug 1, 2008 at 10:46 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 you have to encode the necessary state yourself into the page
 parameters. There is no way for Wicket to be able how to serialize the
 state in the URL in some magic way.

 Martijn

 On Fri, Aug 1, 2008 at 9:41 AM, Uwe Schäfer [EMAIL PROTECTED] wrote:
 Matej Knopp schrieb:

 hi matej

 mount the page using HybridUrlCodingStrategy.

 i already did.

 The url for page instance (you can use PageLink for that) will than look
 like /foo/document/21.5 (where .5 denotes page instance). Note that
 such url *is* bookmarkable, the page instance number doesn't matter.

 when navigating on the page, everything works like expected when coming with
 a bookmarkablepagelink, adding the parameter document=21.

 but, how to get the parameters AND the state in the link ?

 what i see is pagelink, that does not help me using parameters and
 bookmarablepagelink that does not give me the opportunity to add state.

 i suppose what i´d need is a constructor like
 BookmarkablePageLink(String id, Page page, PageParameters parameters) ?

 cu uwe

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





 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 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]



Re: HybridURLs

2008-08-01 Thread Uwe Schäfer

Martijn Dashorst schrieb:


you have to encode the necessary state yourself into the page
parameters. There is no way for Wicket to be able how to serialize the
state in the URL in some magic way.


kind of misunderstanding here. i dont want or need the additional state 
bookmarkable.

all i want is to link to a stateful page and have some parameters set.

like /foo/document/21.wicket-0

this is - in fact - what wicket does internally, when navigating on the 
page. it is just that i do not see a possibility to create links like 
that from pagelink or bookmarkablepagelink.


just to be sure that i make myself clear (i´m not that fluent in 
english), i´ll describe the scenario in detail:


- i have a list/detail page setup.
- the list should link to detail-page using a bookmarkable link.
- if this link is triggered from another session or after timeout, it 
should be possible to show the document according to the given parameters.


(all fine till here with bookmarkablelink  hybridUrlStrategy only)

- what i now want to add is to pass additional state (from the List 
page) to the detail page, that can safely be lost when using the 
bookmark from outside the session. think of back to my search or smth.


i was thinking this should be possible, because wicket does this already 
when using a simple link on the detail page, for instance.


thanks uwe

--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  [EMAIL PROTECTED]
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet [EMAIL PROTECTED]



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



Re: HybridURLs

2008-08-01 Thread Erik van Oosten
 what i now want to add is to pass additional state

You can not do this with a BookmarkablePageLink. The trick is to create
a Link with in the onClick something like:

// note the variant that accepts a Class argument does not work:
setResponsePage(new Page(), pageParameters)
// the redirect will change the URL to whatever is mounted for the
linked to page
setRedirect(true)

Regards,
Erik.


Uwe Schäfer schreef:
 Martijn Dashorst schrieb:

 you have to encode the necessary state yourself into the page
 parameters. There is no way for Wicket to be able how to serialize the
 state in the URL in some magic way.

 kind of misunderstanding here. i dont want or need the additional
 state bookmarkable.
 all i want is to link to a stateful page and have some parameters set.

 like /foo/document/21.wicket-0

 this is - in fact - what wicket does internally, when navigating on
 the page. it is just that i do not see a possibility to create links
 like that from pagelink or bookmarkablepagelink.

 just to be sure that i make myself clear (i´m not that fluent in
 english), i´ll describe the scenario in detail:

 - i have a list/detail page setup.
 - the list should link to detail-page using a bookmarkable link.
 - if this link is triggered from another session or after timeout, it
 should be possible to show the document according to the given
 parameters.

 (all fine till here with bookmarkablelink  hybridUrlStrategy only)

 - what i now want to add is to pass additional state (from the List
 page) to the detail page, that can safely be lost when using the
 bookmark from outside the session. think of back to my search or smth.

 i was thinking this should be possible, because wicket does this
 already when using a simple link on the detail page, for instance.

 thanks uwe


-- 

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



HybridURLs

2008-07-31 Thread Uwe Schäfer

Hi

following situation:

i have a link to a page, that has to be bookmarkable, say:

/foo/document/21

where FooPage is mounted at/foo

no problem here, but: coming from page XY i´d like to pass additional 
data to the foopage, normally done with construction, while i need the 
url still to be bookmarkable and starting with /foo/document/21


that´s what that hybrid stuff is made for, right?

i currently do not see a bookmarkablepagelink taking a page (instead of 
a class). any other ideas ?


thx uwe
--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  [EMAIL PROTECTED]
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet [EMAIL PROTECTED]



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



Re: HybridURLs

2008-07-31 Thread Matej Knopp
Hi,

mount the page using HybridUrlCodingStrategy.

The url for page instance (you can use PageLink for that) will than look
like /foo/document/21.5 (where .5 denotes page instance). Note that
such url *is* bookmarkable, the page instance number doesn't matter.
Unfortunately wicket has to store the page id in url. In the future it
will however probably separated by ?  ( e.g. /foo/document/21?5 )

-Matej

2008/7/31 Uwe Schäfer [EMAIL PROTECTED]:
 Hi

 following situation:

 i have a link to a page, that has to be bookmarkable, say:

 /foo/document/21

 where FooPage is mounted at/foo

 no problem here, but: coming from page XY i´d like to pass additional data
 to the foopage, normally done with construction, while i need the url still
 to be bookmarkable and starting with /foo/document/21

 that´s what that hybrid stuff is made for, right?

 i currently do not see a bookmarkablepagelink taking a page (instead of a
 class). any other ideas ?

 thx uwe
 --

 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 0
 F  + 49 761 3 85 59 550
 E  [EMAIL PROTECTED]
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947

 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die
 kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
 morgens um 9:00 in Ihrer Mailbox.

 Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
 lautet [EMAIL PROTECTED]


 -
 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]