session invalidateNow vs invalidate

2014-12-15 Thread Francois Meillet
just a reminder session invalidateNow vs invalidate if session#invalidateNow is called before a setResponsepage then the application#sessionUnbound is called twice. as invalidateNow is invoked in session#detach. ko getSession().invalidateNow(); setResponsePage(Logout.class); ok #

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread mscoon
Thanks Martin for your answer. Is storing the resource reference in the application metadata once it's created and retrieving it from the metadata on subsequent uses a safe way to create it only once? On Mon, Dec 15, 2014 at 9:19 AM, Martin Grigorov mgrigo...@apache.org wrote: On Sun, Dec 14,

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread Martin Grigorov
With proper synchronization - yes. But I think you won't need to retrieve it later at all. So just make sure it is not added several times Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Dec 15, 2014 at 10:31 PM, mscoon msc...@gmail.com wrote: Thanks

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread mscoon
Hmm now I'm a bit confused. I have a TextTemplate that generates the JQuery autocomplete javascript. I need to pass it the url to retrieve the search results from. So I do: HashMapString, CharSequence vars = new HashMap(); CharSequence url =

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread Martin Grigorov
1. Since you use the same ResRef for all autocompleters then you can just mount it at start time within MyApp#init(). 2. Wicket uses ResourceReference#equals() to find the mounted ResRef so you can do: - mountResource(/some/path/, new MyResRef()) - CharSequence url =

Re: Should I use a (stateless) WebPage or a Resource to return a json response for an autocomplete component?

2014-12-15 Thread mscoon
I am not using the same ResourceReference. getSearchResultsResourcReference() is overridden in subclasses to return a different resource reference as needed. Anyway I think now I understand how to mount the resource from within the component. Thanks! On Mon, Dec 15, 2014 at 10:57 PM, Martin

Re: [SOLVED] how to write Form html in separate Form.html file

2014-12-15 Thread armandoxxx
have any other ideas how to mark topic as solved ? Would appreciate suggestion! regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SOLVED-how-to-write-Form-html-in-separate-Form-html-file-tp4668691p4668782.html Sent from the Users forum mailing list

Reusable form fields ... the proper way disucssion

2014-12-15 Thread armandoxxx
Hey guys I would like to know to properly do this in wicket. I have form fields that I would like to use in several forms ... lets say I want a model object for a SearchFields {country, language} properties in brackets and then I extend it with UserSearchFields {userTags} and