Re: Could not clear select2Choice component model value.
Great ! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sun, Nov 30, 2014 at 4:32 PM, Maxim Solodovnik wrote: > Merged! > > Seems to work as expected in our application > Thanks for the fix Martin! > > On Wed, Nov 26, 2014 at 10:20 AM, Maxim Solodovnik > wrote: > > > Thanks a lot! > > I'll backport! > > > > On Wed, Nov 26, 2014 at 1:34 AM, Martin Grigorov > > wrote: > > > >> Fixed with > >> > >> > https://github.com/wicketstuff/core/commit/b7e5b68b858336d85958663204166bd0852b43dd > >> Hopefully all other use cases are still covered. > >> > >> I just noticed that there is > >> > >> > https://github.com/wicketstuff/core/tree/wicket-6.x/jdk-1.6-parent/select2-parent > >> (i.e. Wicket 6.x version). > >> It would be good if someone backports the improvements from master > branch > >> to wicket-6.x: > >> > >> > https://github.com/wicketstuff/core/commits/master/jdk-1.7-parent/select2-parent > >> It seems Igor has been active last month at > >> https://github.com/ivaynberg/wicket-select2/ and merged few PRs. I've > >> ported them to WicketStuff 7.x but not to 6.x. > >> > >> Martin Grigorov > >> Wicket Training and Consulting > >> https://twitter.com/mtgrigorov > >> > >> On Tue, Nov 25, 2014 at 8:48 PM, Martin Grigorov > >> wrote: > >> > >> > Hi Maxim, > >> > > >> > The change has been introduced in Wicket-Select2 with > >> > https://github.com/ivaynberg/wicket-select2/issues/29 > >> > I'll see how to fix it now. > >> > > >> > Martin Grigorov > >> > Wicket Training and Consulting > >> > https://twitter.com/mtgrigorov > >> > > >> > On Wed, Nov 12, 2014 at 12:11 PM, Martin Grigorov < > mgrigo...@apache.org > >> > > >> > wrote: > >> > > >> >> It is in my TODO list... > >> >> > >> >> Martin Grigorov > >> >> Wicket Training and Consulting > >> >> https://twitter.com/mtgrigorov > >> >> > >> >> On Tue, Nov 11, 2014 at 6:29 PM, Maxim Solodovnik < > >> solomax...@gmail.com> > >> >> wrote: > >> >> > >> >>> Hello Martin, > >> >>> > >> >>> I know you are busy man ..., but, were you able to take a look at > this > >> >>> issue? :) > >> >>> > >> >>> On 22 October 2014 11:23, Maxim Solodovnik > >> wrote: > >> >>> > >> >>> > It seems like script generated in renderInitializationScript > should > >> be > >> >>> > added to AjaxRequestTarget on every Ajax update ... > >> >>> > > >> >>> > On 21 October 2014 17:09, Maxim Solodovnik > >> >>> wrote: > >> >>> > > >> >>> >> Here it is: > >> >>> >> https://github.com/solomax/WicketSelect2Clear > >> >>> >> > >> >>> >> somehow in this example nothing works as expected :( > >> >>> >> I tried 2 different approaches, correct new value arrives to the > >> page > >> >>> >> (according to "wicket debug") but select2 is not being updated :( > >> >>> >> > >> >>> >> On 21 October 2014 13:23, Martin Grigorov > >> >>> wrote: > >> >>> >> > >> >>> >>> Hi Maxim, > >> >>> >>> > >> >>> >>> Please prepare a quickstart at GitHub and I'll take a look. > >> >>> >>> > >> >>> >>> Martin Grigorov > >> >>> >>> Wicket Training and Consulting > >> >>> >>> https://twitter.com/mtgrigorov > >> >>> >>> > >> >>> >>> On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik < > >> >>> solomax...@gmail.com> > >> >>> >>> wrote: > >> >>> >>> > >> >>> >>> > Martin, > >> >>> >>> > > >> >>> >>> > I have forked select2, unfortunately I'm still not sure how to > >> fix > >> >>> the > >> >>> >>> > issue :( > >> >>> >>> > "Clean link" is added to the form and select data is being > >> restored > >> >>> >>> from > >> >>> >>> > requestParameters :( > >> >>> >>> > > >> >>> >>> > On 13 October 2014 19:06, Martin Grigorov < > mgrigo...@apache.org > >> > > >> >>> >>> wrote: > >> >>> >>> > > >> >>> >>> > > Maxim, > >> >>> >>> > > > >> >>> >>> > > Feel free to fork it! I.e. move it to WicketStuff. > >> >>> >>> > > > >> >>> >>> > > Martin Grigorov > >> >>> >>> > > Wicket Training and Consulting > >> >>> >>> > > https://twitter.com/mtgrigorov > >> >>> >>> > > > >> >>> >>> > > On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik < > >> >>> >>> solomax...@gmail.com> > >> >>> >>> > > wrote: > >> >>> >>> > > > >> >>> >>> > > > Additionally select2 seems to need to be forked to > >> wicketstuff > >> >>> to > >> >>> >>> be > >> >>> >>> > > fixed, > >> >>> >>> > > > should I do this? > >> >>> >>> > > > > >> >>> >>> > > > On 10 October 2014 00:49, Maxim Solodovnik < > >> >>> solomax...@gmail.com> > >> >>> >>> > wrote: > >> >>> >>> > > > > >> >>> >>> > > > > @Paul, @Martin > >> >>> >>> > > > > > >> >>> >>> > > > > Select2Choice sets back its value > >> >>> >>> > > > > to > >> getWebRequest().getRequestParameters().getParameterNames() > >> >>> >>> > > > > in renderInitializationScript method [1] > >> >>> >>> > > > > It seems like JS code like: > $("#country1").select2("data", > >> >>> >>> null); can > >> >>> >>> > > be > >> >>> >>> > > > > executed on clear input, but this seems to be workaround > >> >>> >>> > > > > > >> >>> >>> > > > > I'm not sure why [1] method is used to get value, maybe > >> you > >> >>> can > >> >>>
Re: Could not clear select2Choice component model value.
Merged! Seems to work as expected in our application Thanks for the fix Martin! On Wed, Nov 26, 2014 at 10:20 AM, Maxim Solodovnik wrote: > Thanks a lot! > I'll backport! > > On Wed, Nov 26, 2014 at 1:34 AM, Martin Grigorov > wrote: > >> Fixed with >> >> https://github.com/wicketstuff/core/commit/b7e5b68b858336d85958663204166bd0852b43dd >> Hopefully all other use cases are still covered. >> >> I just noticed that there is >> >> https://github.com/wicketstuff/core/tree/wicket-6.x/jdk-1.6-parent/select2-parent >> (i.e. Wicket 6.x version). >> It would be good if someone backports the improvements from master branch >> to wicket-6.x: >> >> https://github.com/wicketstuff/core/commits/master/jdk-1.7-parent/select2-parent >> It seems Igor has been active last month at >> https://github.com/ivaynberg/wicket-select2/ and merged few PRs. I've >> ported them to WicketStuff 7.x but not to 6.x. >> >> Martin Grigorov >> Wicket Training and Consulting >> https://twitter.com/mtgrigorov >> >> On Tue, Nov 25, 2014 at 8:48 PM, Martin Grigorov >> wrote: >> >> > Hi Maxim, >> > >> > The change has been introduced in Wicket-Select2 with >> > https://github.com/ivaynberg/wicket-select2/issues/29 >> > I'll see how to fix it now. >> > >> > Martin Grigorov >> > Wicket Training and Consulting >> > https://twitter.com/mtgrigorov >> > >> > On Wed, Nov 12, 2014 at 12:11 PM, Martin Grigorov > > >> > wrote: >> > >> >> It is in my TODO list... >> >> >> >> Martin Grigorov >> >> Wicket Training and Consulting >> >> https://twitter.com/mtgrigorov >> >> >> >> On Tue, Nov 11, 2014 at 6:29 PM, Maxim Solodovnik < >> solomax...@gmail.com> >> >> wrote: >> >> >> >>> Hello Martin, >> >>> >> >>> I know you are busy man ..., but, were you able to take a look at this >> >>> issue? :) >> >>> >> >>> On 22 October 2014 11:23, Maxim Solodovnik >> wrote: >> >>> >> >>> > It seems like script generated in renderInitializationScript should >> be >> >>> > added to AjaxRequestTarget on every Ajax update ... >> >>> > >> >>> > On 21 October 2014 17:09, Maxim Solodovnik >> >>> wrote: >> >>> > >> >>> >> Here it is: >> >>> >> https://github.com/solomax/WicketSelect2Clear >> >>> >> >> >>> >> somehow in this example nothing works as expected :( >> >>> >> I tried 2 different approaches, correct new value arrives to the >> page >> >>> >> (according to "wicket debug") but select2 is not being updated :( >> >>> >> >> >>> >> On 21 October 2014 13:23, Martin Grigorov >> >>> wrote: >> >>> >> >> >>> >>> Hi Maxim, >> >>> >>> >> >>> >>> Please prepare a quickstart at GitHub and I'll take a look. >> >>> >>> >> >>> >>> Martin Grigorov >> >>> >>> Wicket Training and Consulting >> >>> >>> https://twitter.com/mtgrigorov >> >>> >>> >> >>> >>> On Fri, Oct 17, 2014 at 5:42 PM, Maxim Solodovnik < >> >>> solomax...@gmail.com> >> >>> >>> wrote: >> >>> >>> >> >>> >>> > Martin, >> >>> >>> > >> >>> >>> > I have forked select2, unfortunately I'm still not sure how to >> fix >> >>> the >> >>> >>> > issue :( >> >>> >>> > "Clean link" is added to the form and select data is being >> restored >> >>> >>> from >> >>> >>> > requestParameters :( >> >>> >>> > >> >>> >>> > On 13 October 2014 19:06, Martin Grigorov > > >> >>> >>> wrote: >> >>> >>> > >> >>> >>> > > Maxim, >> >>> >>> > > >> >>> >>> > > Feel free to fork it! I.e. move it to WicketStuff. >> >>> >>> > > >> >>> >>> > > Martin Grigorov >> >>> >>> > > Wicket Training and Consulting >> >>> >>> > > https://twitter.com/mtgrigorov >> >>> >>> > > >> >>> >>> > > On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik < >> >>> >>> solomax...@gmail.com> >> >>> >>> > > wrote: >> >>> >>> > > >> >>> >>> > > > Additionally select2 seems to need to be forked to >> wicketstuff >> >>> to >> >>> >>> be >> >>> >>> > > fixed, >> >>> >>> > > > should I do this? >> >>> >>> > > > >> >>> >>> > > > On 10 October 2014 00:49, Maxim Solodovnik < >> >>> solomax...@gmail.com> >> >>> >>> > wrote: >> >>> >>> > > > >> >>> >>> > > > > @Paul, @Martin >> >>> >>> > > > > >> >>> >>> > > > > Select2Choice sets back its value >> >>> >>> > > > > to >> getWebRequest().getRequestParameters().getParameterNames() >> >>> >>> > > > > in renderInitializationScript method [1] >> >>> >>> > > > > It seems like JS code like: $("#country1").select2("data", >> >>> >>> null); can >> >>> >>> > > be >> >>> >>> > > > > executed on clear input, but this seems to be workaround >> >>> >>> > > > > >> >>> >>> > > > > I'm not sure why [1] method is used to get value, maybe >> you >> >>> can >> >>> >>> > suggest >> >>> >>> > > > > correct way of fixing this? >> >>> >>> > > > > >> >>> >>> > > > > >> >>> >>> > > > > [1] >> >>> >>> > > > > >> >>> >>> > > > >> >>> >>> > > >> >>> >>> > >> >>> >>> >> >>> >> https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62 >> >>> >>> > > > > >> >>> >>> > > > > On 9 October 2014 16:39, MadasamySankarapandian < >> >>> >>> > > madas...@mcruncher.com> >> >>> >>> > > > > wrote: >> >>> >>> > > > > >