Works as expected! Thanks for the quick fix :) On Tue, Feb 6, 2018 at 4:53 PM, Sven Meier <s...@meiers.net> wrote:
> Hi Maxim, > > you're right, it was related to multipart requests: > > Empty inputs must be appended as "" to the FormData, otherwise "null" will > be sent to the server. > > Many thanks > Sven > > > Am 06.02.2018 um 03:55 schrieb Maxim Solodovnik: > >> Hello Sven, >> >> sorry for delay >> Here is the quick-start: https://github.com/solomax/form-null-value.git >> To reproduce the issue >> 1) mvn jetty:run >> 2) go to http://localhost:8080 >> 3) Click "Reset" >> >> Everything will work as expected if >> 1) wicket version is set to M8 >> 2) any value is selected in drop down before clicking reset >> >> Will continue debugging ... >> >> On Mon, Feb 5, 2018 at 5:42 PM, Maxim Solodovnik <solomax...@gmail.com> >> wrote: >> >> Just re-read your question >>> >>> The form IS multi-part (has file upload) >>> Will try to prepare quick start this evening >>> >>> On Mon, Feb 5, 2018 at 1:58 PM, Maxim Solodovnik <solomax...@gmail.com> >>> wrote: >>> >>> Actually this issue is reproducible in our project with select2 field >>>> MultiSelect from here: https://github.com/wicke >>>> tstuff/core/tree/master/select2-parent >>>> >>>> Will try to test using select2 example projects >>>> >>>> On Mon, Feb 5, 2018 at 1:56 PM, Sven Meier <s...@meiers.net> wrote: >>>> >>>> Hi Maxim, >>>>> >>>>> are you using multipart requests? If not, there shouldn't be any change >>>>> in serializing the input fields. >>>>> >>>>> I've tried Ajax and non-Ajax requests but cannot reproduce the problem. >>>>> Are you entering "[null] into a field, without quotes but *with* square >>>>> brackets? >>>>> >>>>> Sven >>>>> >>>>> >>>>> >>>>> Am 05.02.2018 um 03:28 schrieb Maxim Solodovnik: >>>>> >>>>> Hello Sven, >>>>>> >>>>>> The issue is caused by this [1] commit >>>>>> the form is now being serialized differently >>>>>> >>>>>> Previously FormComponent.getInputAsArray method got (Object)null as >>>>>> input >>>>>> Right now it is [null] as List<StringValue> .... >>>>>> >>>>>> [1] >>>>>> https://github.com/apache/wicket/commit/f642f4ad4266319731b2 >>>>>> 00e517eadf53fef5a56b >>>>>> >>>>>> On Mon, Feb 5, 2018 at 12:02 AM, Sven Meier <s...@meiers.net> wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>>> Investigation shows "[null]" string is being converted to ["null"] >>>>>>> (new >>>>>>> >>>>>>> String[]{"null"}) by FormComponent.getInputAsArray method >>>>>>>> >>>>>>>> "null" does not seem right. Can you pin down this problem to a >>>>>>>> recent >>>>>>>> >>>>>>> commit in Wicket? I don't remember any change in FormComponent >>>>>>> related >>>>>>> to >>>>>>> this. >>>>>>> >>>>>>> Regards >>>>>>> Sven >>>>>>> >>>>>>> >>>>>>> >>>>>>> Am 04.02.2018 um 17:09 schrieb Maxim Solodovnik: >>>>>>> >>>>>>> Hello All, >>>>>>> >>>>>>>> 'master' branch of our main application is based on 8.0.0-SNAPSHOT >>>>>>>> Tonight we have error report: our latest build fails without changes >>>>>>>> in >>>>>>>> our >>>>>>>> code >>>>>>>> >>>>>>>> Investigation shows "[null]" string is being converted to ["null"] >>>>>>>> (new >>>>>>>> String[]{"null"}) by FormComponent.getInputAsArray method >>>>>>>> >>>>>>>> I see no tests for this method, and I believe "[null]" input should >>>>>>>> be >>>>>>>> converted to [null] (new String[]{null}) >>>>>>>> >>>>>>>> Shall I fix it in Wicket code on in our code? >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>> -- >>>> WBR >>>> Maxim aka solomax >>>> >>>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >>> >> >> > -- WBR Maxim aka solomax