Re: swap panels from child element

2015-02-02 Thread Sven Meier
Hi, replacing is really easy: this.addOrReplace(panel); ... as long as all your panels have an identical Wicket id. I often prefer this approach over changing visibility because of smaller session size (i.e. not keeping unused panels in the component tree) and simpler markup (i.e. not

Re: Empty form values after successful onSubmit?

2015-02-02 Thread Sven Meier
Hi, I don't think you're doing something weird, you're just seeing the normal Wicket behavior: I debugged a bit Good! that success calls though to some logic which marks my page as dirty generated a new version number, stores the changed page in the session All pretty normal. I don't see

Re: put Javascript in HTML body

2015-02-02 Thread Martin Grigorov
Hi, You can extend OnDomReadyHeaderItem, e.g. MyOnDomReadyHeaderItem, and then filter only instances of this type to be rendered in the body. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Feb 2, 2015 at 3:34 PM, Chris chris...@gmx.at wrote: Hi Martin,

Re: Empty form values after successful onSubmit?

2015-02-02 Thread Martin Grigorov
On Mon, Feb 2, 2015 at 10:03 PM, Sven Meier s...@meiers.net wrote: Hi, I don't think you're doing something weird, you're just seeing the normal Wicket behavior: I debugged a bit Good! that success calls though to some logic which marks my page as dirty generated a new version number,

Re: swap panels from child element

2015-02-02 Thread Grün Christoph
Andrea - thanks, but how can I access the panels from a child panel within the component hierarchy of a page without having to put them in the constructor of each child panel? best regards, Chris Am 02.02.2015 um 19:02 schrieb Andrea Del Bene an.delb...@gmail.com: Changing visibility is

Re: swap panels from child element

2015-02-02 Thread Martin Grigorov
Hi, You can use Wicket Events - http://www.wicket-library.com/wicket-examples-6.0.x/events/ Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Feb 2, 2015 at 8:25 PM, Grün Christoph christ...@ec.tuwien.ac.at wrote: Andrea - thanks, but how can I access the

Re: put Javascript in HTML body

2015-02-02 Thread Chris
Hi Martin, Shengche, thanks a lot! I used the approach as explained in http://wicket.apache.org/guide/guide/resources.html#resources_7 http://wicket.apache.org/guide/guide/resources.html#resources_7 by providing a custom IHeaderResponseDecorator and using the Wicket container tag. Then I

Re: Wicket JQuery Selectable Sortable combined

2015-02-02 Thread Chris
Hi Sebastien, thanks a lot for your example, it works fine! One question remains: how is it possible to add the ListModel as Ajax target so that when I delete a selected element, the displayed elements are updated? @Override public void onSelect(AjaxRequestTarget target, ListString items) {

Re: Plans for further wicket classes with generics

2015-02-02 Thread Martin Grigorov
Hi, There is a discussion about this since Wicket 1.4 (the first version of Wicket built against JDK 1.5). The main stopper is that using generics makes the code even more verbose. And many people don't like this. So there are few Generic*** versions of the most used components. Martin Grigorov

Re: GMap3 - Show title of markers permanently

2015-02-02 Thread Chris
Thanks a lot! Chris Am 02.02.2015 um 08:12 schrieb Martin Grigorov mgrigo...@apache.org mailto:mgrigo...@apache.org: aps v3 JS API and if there is a way then look in WicketStuff integration to apply it.

Plans for further wicket classes with generics

2015-02-02 Thread Thibault Kruse
Hi, Already in Wicket there is GenericPanel, GenericWebPage, GenericFragment, IGenericComponent, and IModel of course is already generic. But there is still IBehavior without Generics and several standard components which do not implement IGenericComponent such a Label. Are there plans to

Re: Having Wicket manage resources outside classpath

2015-02-02 Thread Tobias Soloschenko
It would be good to change the Wicket implementation here so that several ICssCompressor could be added. With an ArrayList for example - then you could add a css compressor to the beginning of the chain with getCssCompressors().add(0,myCoolNewCssCompressor) kind regards Tobias Am 02.02.2015

Re: Having Wicket manage resources outside classpath

2015-02-02 Thread Tobias Soloschenko
Hi, https://github.com/klopfdreh/wicket-components-playground See CssUrlReplacer kind regards Tobias Am 02.02.2015 um 09:51 schrieb Martin Grigorov mgrigo...@apache.org: Additionally we used preloading of static resources. At app start time (i.e. MyApp#init()) we fired an artificial

Re: Plans for further wicket classes with generics

2015-02-02 Thread Thibault Kruse
I see, I guess this was summarized here: https://cwiki.apache.org/confluence/display/WICKET/generics On Mon, Feb 2, 2015 at 2:27 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, There is a discussion about this since Wicket 1.4 (the first version of Wicket built against JDK 1.5). The

Empty form values after successful onSubmit?

2015-02-02 Thread Thorsten Schöning
Hi all, I have some very straightforward forms, but am really new to the whole stateful forms/pages thing in Wicket. My form has some elements with validators and if things fail the form is rendered again with the former input values and a feedback message with the error. If no error occured my

Re: Wicket JQuery Selectable Sortable combined

2015-02-02 Thread Sebastien
Hi Chris, You're welcome! The list is already the Sortable's model object, if you are able to send the item hash, you are able to retrieve the item, then you just have to invoke Sortable#onRemove(target, item) [1] and this should be all fine... Hope this helps, Sebastien. [1]

Re: Empty form values after successful onSubmit?

2015-02-02 Thread Sven Meier
Hi Thorsten, a Form clears all FormComponents' input automatically on a successful submit. Why do you think that this is not the case? Regards Sven On 02.02.2015 17:11, Thorsten Schöning wrote: Hi all, I have some very straightforward forms, but am really new to the whole stateful

Re: Empty form values after successful onSubmit?

2015-02-02 Thread Thorsten Schöning
Guten Tag Sven Meier, am Montag, 2. Februar 2015 um 17:38 schrieben Sie: a Form clears all FormComponents' input automatically on a successful submit. Why do you think that this is not the case? Because that's what I see. ;-) Using the following code: @Override protected

Re: Empty form values after successful onSubmit?

2015-02-02 Thread Thorsten Schöning
Guten Tag Thorsten Schöning, am Montag, 2. Februar 2015 um 18:13 schrieben Sie: I do see the success message AND the values of the input which have been sent. I debugged a bit and can verify that success calls though to some logic which marks my page as dirty, generated a new version number,

Re: swap panels from child element

2015-02-02 Thread Andrea Del Bene
Changing visibility is less complex and if the result looks good I would go for it. Hi, I would like to swap panels B and C when the user clicks on a certain div element in Subpanel Aa The Page consists of following panels: - Panel A Subpanel Aa - Panel B - Panel C How can I access the

swap panels from child element

2015-02-02 Thread Chris
Hi, I would like to swap panels B and C when the user clicks on a certain div element in Subpanel Aa The Page consists of following panels: - Panel A Subpanel Aa - Panel B - Panel C How can I access the panels B and C and replace them or change their visibility from the WebMarkupContainer

Re: Having Wicket manage resources outside classpath

2015-02-02 Thread Tobias Soloschenko
Hi, would be a good to see such an implementation out of the box. (CSSCompressor) I try to do it soon - maybe with a varags of URLs which are going to be passed into the CSS file. kind regards Tobias Am 02.02.2015 um 08:35 schrieb Martin Grigorov mgrigo...@apache.org: Hi, Putting

Re: Having Wicket manage resources outside classpath

2015-02-02 Thread Martin Grigorov
Hi Tobias, I imagine it with a regex that parses for url(...) and replaces the old url with a new one. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Feb 2, 2015 at 10:31 AM, Tobias Soloschenko tobiassolosche...@googlemail.com wrote: Hi, would be a

Re: Having Wicket manage resources outside classpath

2015-02-02 Thread Tobias Soloschenko
Good idea, I'm going to make it this way! kind regards Tobias Am 02.02.2015 um 09:36 schrieb Martin Grigorov mgrigo...@apache.org: Hi Tobias, I imagine it with a regex that parses for url(...) and replaces the old url with a new one. Martin Grigorov Wicket Training and Consulting

Re: Having Wicket manage resources outside classpath

2015-02-02 Thread Martin Grigorov
Additionally we used preloading of static resources. At app start time (i.e. MyApp#init()) we fired an artificial request to all registered CSS/JS bundles. The response has been cached (by a specialization of ConcatBundleResource) and later all real/runtime requests were using the cache. This way