Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Sven Meier
Hi Philip, ListView throws away all its children before rendering. When a component is removed, its model gets detached. Your AjaxLink has your LoadableDetachableModel as model, thus it forces it to be detached too. As a possible solution, don't keep a reference to the model as your

Re: getAssociatedMarkup() invoked twice

2012-01-09 Thread Martin Grigorov
Hi, This can be easily optimized. I'll take care. On Mon, Jan 9, 2012 at 8:17 AM, TH Lim ssh...@gmail.com wrote: Hi, I made my custom markup WebPage, not the default HTML and WebPage pair, to generate JSON responses. My custom WebPage implemented IMarkupCacheKeyProvider and

Re: getAssociatedMarkup() invoked twice

2012-01-09 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-4329 On Mon, Jan 9, 2012 at 11:05 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, This can be easily optimized. I'll take care. On Mon, Jan 9, 2012 at 8:17 AM, TH Lim ssh...@gmail.com wrote: Hi, I made my custom markup WebPage, not the

Re: stateless, not versioned pages - session problem

2012-01-09 Thread Martin Grigorov
On Sun, Jan 8, 2012 at 4:29 PM, Chris Colman chr...@stepaheadsoftware.com wrote: On Sun, Jan 8, 2012 at 11:31 AM, Chris Colman chr...@stepaheadsoftware.com wrote: Not sure if I have an answer to your question but recently I asked how to turn off page versioning and was told to do:

RE: stateless, not versioned pages - session problem

2012-01-09 Thread Chris Colman
The stateless/stateful issue, on the surface at least, seems to be trivially easy because it's so black and white. Obviously in an ideal world most pages should be made stateless but in all but trivial sites this is near impossible. I'd like to suggest there is a fair amount of 'gray' - that

Re: hebrew text looks like ×׳—׳‘׳¨׳ •

2012-01-09 Thread Richard W. Adams
HTML files should not have have an XML header. Only XHTML files should. From: armhold armh...@gmail.com To: users@wicket.apache.org Date: 01/06/2012 08:31 PM Subject:Re: hebrew text looks like ×׳—׳‘׳¨׳• I went though this pain a few months ago too. Here are all the places I

Re: stateless, not versioned pages - session problem

2012-01-09 Thread Martin Grigorov
Hi, I see there is a big misunderstanding of what stateless/ful actually is. Having an http session or not is related only to the fact that stateful pages are stored there. Nothing more. You still can have an authenticated user (i.e. http session) and show stateless pages. All user info panels

Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Philip Wilkinson
Sven, Thanks for your speedy reply. Indeed you are correct, removing the model from the AjaxLink stops the model from becoming detached immediately before rendering. I now realise that my cut-down example was too cut-down! The AjaxLink is actually there to remove the entry from the list,

Re: stateless, not versioned pages - session problem

2012-01-09 Thread kamiseq
this should go to separate conversation I created stateless (no stateful components) page if user is authorized i put his id to session so I can load it on each page creation (since it is stateless and not versioned it will be created on each request) pozdrawiam Paweł Kamiński kami...@gmail.com

Re: stateless, not versioned pages - session problem

2012-01-09 Thread kamiseq
any ideas about #base_domain=mydomain.com problem ;] pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional

Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Igor Vaynberg
the problem here is that the listitem's model is tied to the listview's model. so calling detach() on the listview item causes the detachment of the listview's model. you can either override getlistitemmodel() on the listview and give each item an isolated model, or you can use a dataview or

Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Sven Meier
you can ... give each item an isolated model Actually ListItemModel doesn't detach the owning list's model, so it's 'isolated' already. For your AjaxLink you can access the list view instead: IModelListString model = ... // not final !! final ListViewString rows = new

Re: hebrew text looks like ×׳—׳‘׳¨׳ •

2012-01-09 Thread Sven Meier
Hi, the header is ok, but Wicket's xml parser won't be able to infer the encoding. Use IMarkupSettings#setDefaultMarkupEncoding() as Martin has suggested. Regards Sven On 01/09/2012 03:53 PM, Bertrand Guay-Paquet wrote: After some research, I'm now using the following html header :

Re: hebrew text looks like ×׳—׳‘׳¨׳ •

2012-01-09 Thread Bertrand Guay-Paquet
Yes this is good advice. I actually use the html header + setDefaultMarkupEncoding(). On 09/01/2012 1:36 PM, Sven Meier wrote: Hi, the header is ok, but Wicket's xml parser won't be able to infer the encoding. Use IMarkupSettings#setDefaultMarkupEncoding() as Martin has suggested. Regards

Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Philip Wilkinson
Thanks Sven, interesting idea however, rows is not accessible to onClick() method as compilation error, rows not accessible as may not be initialised. I guess Id have to getParent() loop until I found a ListView component :( Cheers, Phil. On Mon, Jan 9, 2012 at 6:31 PM, Sven Meier

Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Sven Meier
Ah, yes, stupid compiler ;). You can keep the model final and use it on your onClick(), but *not* passing it to the AjaxLink constructor: final IModelListStringmodel = ... // final again !! final ListViewStringrows = new ListViewString(rows, model) {

Re: AjaxLink causes list model to be detached before rendering!

2012-01-09 Thread Philip Wilkinson
Hi Sven, OK thanks, that's good, with this.. final IModelListString model = new LoadableDetachableModelListString() { @Override protected ListString load() { System.out.println(LOAD LIST

Re: stateless, not versioned pages - session problem

2012-01-09 Thread kamiseq
ok I found the reason oAuth provider adds this #base_domain to callback url. I just dont understand why it stayed after redirection. the other issue (that after redirect urls looks like callback) is that I use ReplaceHandlerException and I rewrite data from original response to preserve cookies.

Problem with relative URLs

2012-01-09 Thread Chris Colman
I'm having a problem with relative URLs. If the current page is: content/mypage/n1/p1/n2/fred And it contains a link to content/mypage/n1/p1/n2/jane The relative URL rendered to HTML is: ../../../../../../jane Which of course is wrong as the browser tries to jump to: jane

Re: Problem with relative URLs

2012-01-09 Thread Igor Vaynberg
On Mon, Jan 9, 2012 at 5:51 PM, Chris Colman chr...@stepaheadsoftware.com wrote: I'm having a problem with relative URLs. If the current page is: content/mypage/n1/p1/n2/fred And it contains a link to content/mypage/n1/p1/n2/jane The relative URL rendered to HTML is:

RE: Problem with relative URLs

2012-01-09 Thread Chris Colman
I looked at the URL renderer and it was returning just 'jane' instead of ../jane actually jane is correct and ../jane is incorrect. if the browser is on content/mypage/n1/p1/n2/fred then going to a relative url jane will produce content/mypage/n1/p1/n2/jane which is what you want, no...?

RE: Problem with relative URLs

2012-01-09 Thread Chris Colman
why is RelativePathPrefixHandler invoked on that tag? sounds a little funky... -igor I'm using UrlPathPageParametersEncoder for backwards compatibility with 1.5 links. I'm not sure if that could be causing the funkiness of RelativePathPrefixHandler being invoked. Are BookmarkablePageLinks

Re: Problem with relative URLs

2012-01-09 Thread Igor Vaynberg
wicket by default always generates relative urls. this is the safest/easiest approach for fronting the app with a proxy, which most people do... -igor On Mon, Jan 9, 2012 at 6:59 PM, Chris Colman chr...@stepaheadsoftware.com wrote: why is RelativePathPrefixHandler invoked on that tag? sounds a

RE: Problem with relative URLs

2012-01-09 Thread Chris Colman
wicket by default always generates relative urls. this is the safest/easiest approach for fronting the app with a proxy, which most people do... -igor I guess there are three types of urls: Relative: Url with no leading protocol or '/' Absolute: Urls with a leading / Complete: Urls with