Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6125

Hidden Field: Does not support storing into type 'java.lang.Long'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.3
    • 6.2.2
    • dialogs, forms
    • None
    • UI FW 9
    • 3

      Situation:

      columnAmount:
        $type: hiddenField
        defaultValue: 2
        type: java.lang.Long
      • I also tried 'type: Long' and type: long', same problem

      Try:

      PD should try the 'type' property on all Fields, I'm not convinced its working at all on the other fields.

      Problem:

      Caused by: java.lang.RuntimeException: java.lang.ClassCastException: Cannot cast java.lang.String to java.lang.Long
      	at com.vaadin.data.Binder$BindingBuilderImpl.lambda$createConverter$d263765c$2(Binder.java:872) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Result.of(Result.java:93) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Converter.lambda$from$28ca080b$1(Converter.java:105) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Converter$1.convertToModel(Converter.java:131) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Converter$2.lambda$convertToModel$5daf174e$1(Converter.java:167) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.SimpleResult.flatMap(SimpleResult.java:66) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.ValidationResultWrap.flatMap(ValidationResultWrap.java:66) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Converter$2.convertToModel(Converter.java:167) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Binder$BindingImpl.doConversion(Binder.java:1109) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Binder$BindingImpl.doValidation(Binder.java:1126) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Binder$BindingImpl.access$1400(Binder.java:1001) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Binder.lambda$validateBindings$11(Binder.java:2066) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_112]
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_112]
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_112]
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_112]
      	at com.vaadin.data.Binder.validateBindings(Binder.java:2067) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Binder.validate(Binder.java:2006) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.data.Binder.validate(Binder.java:1985) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at info.magnolia.ui.editor.FormPresenter.lambda$validateBoundProperties$6(FormPresenter.java:139) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at java.util.HashMap.forEach(HashMap.java:1288) ~[?:1.8.0_112]
      	at info.magnolia.ui.editor.FormPresenter.validateBoundProperties(FormPresenter.java:137) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at info.magnolia.ui.editor.FormView.validate(FormView.java:173) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at info.magnolia.ui.editor.FormView.lambda$validate$9(FormView.java:177) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) ~[?:1.8.0_112]
      	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1620) ~[?:1.8.0_112]
      	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[?:1.8.0_112]
      	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270) ~[?:1.8.0_112]
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_112]
      	at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:1.8.0_112]
      	at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_112]
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_112]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_112]
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_112]
      	at info.magnolia.ui.editor.FormView.validate(FormView.java:179) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at info.magnolia.ui.contentapp.action.CommitAction.execute(CommitAction.java:78) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:62) ~[magnolia-ui-api-6.2.2.jar:?]
      	at info.magnolia.ui.dialog.ActionExecution.execute(ActionExecution.java:73) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at info.magnolia.ui.dialog.ActionButton.lambda$new$d31ec881$1(ActionButton.java:65) ~[magnolia-ui-framework-6.2.2.jar:?]
      	at sun.reflect.GeneratedMethodAccessor619.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:499) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:273) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:237) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1014) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.ui.Button.fireClick(Button.java:384) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at sun.reflect.GeneratedMethodAccessor618.invoke(Unknown Source) ~[?:?]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:155) ~[vaadin-server-8.9.4.jar:8.9.4]
      

        Acceptance criteria

              rkovarik Roman Kovařík
              cringele Christian Ringele
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2h 26m
                  2h 26m