Wednesday, December 3, 2014

How to register Custom HTML Element as widget in GWT




Did someone have any idea how to register custom html element as GWT widget uiBinder and use them directly in place of using in HTMLPanel.

For eg if i'm using Google Polymer in my mgwt project i have to use this as

                 <g:HTMLPanel >                      <paper-shadow class="{style.card}">                          <mgwt:touch.TouchPanel ui:field="touchPanel">                              <mgwt:panel.flex.FlexPanel orientation="VERTICAL" alignment="CENTER">                                  <g:Image url="{global.getDirection.getSafeUri.asString}" />                                  <g:HTMLPanel>Take me to Deal</g:HTMLPanel>                              </mgwt:panel.flex.FlexPanel>                          </mgwt:touch.TouchPanel>                      </paper-shadow>                  </g:HTMLPanel>

I want to register/create paper-shadow as custom widget so that i can use this as

                <polymer:paper-shadow class="{style.card}">                      <mgwt:touch.TouchPanel ui:field="touchPanel">                          <mgwt:panel.flex.FlexPanel orientation="VERTICAL" alignment="CENTER">                              <g:Image url="{global.getDirection.getSafeUri.asString}" />                              <g:HTMLPanel>Take me to Deal</g:HTMLPanel>                          </mgwt:panel.flex.FlexPanel>                      </mgwt:touch.TouchPanel>                  <polymer:paper-shadow>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment