Results 1 to 2 of 2

Thread: View inheritance with @UiBinder

  1. #1
    Ext GWT Premium Member
    Join Date
    Sep 2010
    Location
    Odense, Dk
    Posts
    4
    Vote Rating
    0
      0  

    Default View inheritance with @UiBinder

    Hi all.
    I'm migrating all my views from the old style to @UiBinder based and I'm facing some troubles
    I used to have base views (Composite) in charge of adding common components, ie: EditModelBaseView is in charge of adding the save and cancel button, so that all the sub views will render those components by inheritance.
    I can't get it to work... I would need a sort of xml inheritance, besides the the class inheritance, but this doesn't seem to be possible because the compiler complains stating the inherited attributes aren't declared in the subview ui.xml. How would this approach be matched with UiBinder based views?

    Marcio

  2. #2
    Sencha User PhiLho's Avatar
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    140
    Vote Rating
    1
      0  

    Default

    Pasting (more or less) my answer from GWT Google Group:

    It is hard to see what is your exact problem without seeing some code, but for what it is worth, you can declare UiBinder components and re-use them, like:

    Code:
    <ui:UiBinder
        xmlns:ui='urn:ui:com.google.gwt.uibinder'
        xmlns:g="urn:import:com.google.gwt.user.client.ui"
        xmlns:gxt="urn:import:com.sencha.gxt.widget.core.client"
        xmlns:container="urn:import:com.sencha.gxt.widget.core.client.container"
        xmlns:form="urn:import:com.sencha.gxt.widget.core.client.form"
        xmlns:our="urn:import:com.our.company.web.client" 
        >
    then use it as:

    Code:
    <our:MenuBar/>
    or
    Code:
    <our:subpackage.OtherComponent/>
    The components must be quite autonomous, perhaps exposing an API for using from other components.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •