2 Replies Latest reply on Aug 3, 2017 11:16 AM by mbarkley

    Elemental2 Dom and Errai example

    hr.stoyanov

      Max,

      Thanks for updating the errai tutorial to use the new elemental2 DOM wrappers. Looking at the code though, I notice that you still use the old Errai wrappers. For example, how would you go about re-implementing BindableEmailAnchor with elemental2.dom.HTMLAnchorElement given that the Errai DOM wrappers are interfaces and not classes ? Would you have to do CDI producers for custom extensions as well ( I think so ..)?

       

      Thanks!

        • 1. Re: Elemental2 Dom and Errai example
          mbarkley

          Hi Hristo,

           

          It should be possible to re-implement BindableEmailAnchor my making a native JS type that extends the elemental HTMLAnchorElement and implements Errai's HasValue with the same annotations. Once we have full Elemental 2 support in Errai (we are still working on built-in injectors for all Elemental 2 DOM element types) we will update the tutorial to use more Elemental 2.

           

          > Would you have to do CDI producers for custom extensions as well ( I think so ..)?

           

          Not sure what you mean by that.

          • 2. Re: Elemental2 Dom and Errai example
            mbarkley

            > Would you have to do CDI producers for custom extensions as well ( I think so ..)?

             

            Just re-read and now I understand. We will eventually provide built-in injectors for all Elemental 2 element types, but if you make your own type you will either have to:

            • Make your own CDI producer
            • Use the @Element annotation like the PaperInput in errai-tutorial