Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Angers, France
    Posts
    6
    Vote Rating
    1
    pgy49 is on a distinguished road

      1  

    Default TabPanel and uibinder

    TabPanel and uibinder


    Hello,

    I don't know if this is a bug or if I miss something...
    When I try using the TabPanel, with the same code as the Explorer Demo, I have the following error:
    Code:
    java.lang.NullPointerException: null
        at com.google.gwt.safehtml.shared.SafeHtmlUtils.htmlEscape(SafeHtmlUtils.java:156)
        at com.sencha.gxt.theme.base.client.tabs.TabPanelBaseAppearance_ItemTemplate_render_SafeHtml__TabPanelBaseStyle_style__TabItemConfig_config___SafeHtmlTemplatesImpl.render0(TabPanelBaseAppearance_ItemTemplate_render_SafeHtml__TabPanelBaseStyle_style__TabItemConfig_config___SafeHtmlTemplatesImpl.java:18)
        at com.sencha.gxt.theme.base.client.tabs.TabPanelBaseAppearance_ItemTemplateImpl.render(TabPanelBaseAppearance_ItemTemplateImpl.java:30)
        at com.sencha.gxt.theme.base.client.tabs.TabPanelBaseAppearance.insert(TabPanelBaseAppearance.java:218)
        at com.sencha.gxt.widget.core.client.TabPanel.insert(TabPanel.java:368)
        at com.sencha.gxt.widget.core.client.TabPanel.add(TabPanel.java:203)
        at test.tabtest.client.TabTestUi_MyUiBinderImpl.createAndBindUi(TabTestUi_MyUiBinderImpl.java:32)
        at test.tabtest.client.TabTestUi_MyUiBinderImpl.createAndBindUi(TabTestUi_MyUiBinderImpl.java:1)
        at test.tabtest.client.TabTestUi.asWidget(TabTestUi.java:28)
        at test.tabtest.client.TabTestUi.onModuleLoad(TabTestUi.java:32)
    In debug mode, I see that TabItemConfig as a null "text" field.

    This is the code:
    Code:
    package test.tabtest.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.event.logical.shared.SelectionEvent;
    import com.google.gwt.uibinder.client.UiBinder;
    import com.google.gwt.uibinder.client.UiField;
    import com.google.gwt.uibinder.client.UiHandler;
    import com.google.gwt.user.client.ui.Composite;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.widget.core.client.TabItemConfig;
    import com.sencha.gxt.widget.core.client.TabPanel;
    import com.sencha.gxt.widget.core.client.info.Info;
    
    public class TabTestUi extends Composite implements IsWidget, EntryPoint {
    
         interface MyUiBinder extends UiBinder<Widget, TabTestUi> {
          }
         
          private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
         
          @UiField(provided = true)
          String txt = "Bla bla bla bla bla";
         
          public Widget asWidget() {
            return uiBinder.createAndBindUi(this);
          }
         
          public void onModuleLoad() {
            RootPanel.get().add(asWidget());
          }
         
          @UiHandler(value = {"folder", "panel"})
          void onSelection(SelectionEvent<Widget> event) {
            TabPanel panel = (TabPanel) event.getSource();
            Widget w = event.getSelectedItem();
            TabItemConfig config = panel.getConfig(w);
            Info.display("Message", "'" + config.getText() + "' Selected");
          }
    }
    and

    Code:
    <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
    <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
        xmlns:g="urn:import:com.google.gwt.user.client.ui" 
        xmlns:tabs="urn:import:com.sencha.gxt.widget.core.client"
        xmlns:container="urn:import:com.sencha.gxt.widget.core.client.container">
    
        <ui:with type="java.lang.String" field="txt" />
    
    
        <ui:with type="com.sencha.gxt.widget.core.client.TabItemConfig"
            field="shortTextTabConfig">
            <ui:attributes text="Short Text" />
        </ui:with>
        <ui:with type="com.sencha.gxt.widget.core.client.TabItemConfig"
            field="longTextTabConfig">
            <ui:attributes text="Long Text" />
        </ui:with>
        <ui:with type="com.sencha.gxt.widget.core.client.TabItemConfig"
            field="normalTabConfig">
            <ui:attributes text="Normal" />
        </ui:with>
    
        <ui:with type="com.sencha.gxt.widget.core.client.TabItemConfig"
            field="disabledTabConfig">
            <ui:attributes text="Disabled" enabled="false" />
        </ui:with>
    
        <ui:style>
            .sep {
                margin-top: 20px;
            }
        </ui:style>
    
        <container:FlowLayoutContainer>
            <tabs:TabPanel ui:field="folder" width="450"
                addStyleNames="margin-10">
                <tabs:child config="{shortTextTabConfig}">
                    <g:Label addStyleNames="pad-text" text="{txt}" />
                </tabs:child>
    
                <tabs:child config="{longTextTabConfig}">
                    <container:FlowLayoutContainer>
                        <g:Label text="{txt}" addStyleNames="pad-text" />
                        <g:Label text="{txt}" addStyleNames="pad-text {style.sep}" />
                    </container:FlowLayoutContainer>
                </tabs:child>
            </tabs:TabPanel>
    
            <tabs:TabPanel ui:field="panel" plain="true" pixelSize="450, 250"
                addStyleNames="margin-10">
                <tabs:child config="{normalTabConfig}">
                    <g:Label text="Just a plain old tab" addStyleNames="pad-text" />
                </tabs:child>
    
                <tabs:child config="{disabledTabConfig}">
                    <g:Label text="This tab should be disabled" addStyleNames="pad-text" />
                </tabs:child>
            </tabs:TabPanel>
        </container:FlowLayoutContainer>
    
    </ui:UiBinder>
    Thanks.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Do you have the uibinder bridge on your classpath?

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Angers, France
    Posts
    6
    Vote Rating
    1
    pgy49 is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    Do you have the uibinder bridge on your classpath?
    I work with Eclipse, I have gxt-3.0.0-SNAPSHOT and uibinder-bridge-2.4.0 in the BUILD Path.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default


    Maybe forgot to adjust your module xml file?
    You need this:
    Code:
      <inherits name='com.google.gwt.uibinder.UiBinder' />
      <inherits name="com.sencha.gwt.uibinder.UiBinder"/>

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    Angers, France
    Posts
    6
    Vote Rating
    1
    pgy49 is on a distinguished road

      0  

    Default


    Quote Originally Posted by DarekKay View Post
    Maybe forgot to adjust your module xml file?
    You need this:
    Code:
      <inherits name='com.google.gwt.uibinder.UiBinder' />
      <inherits name="com.sencha.gwt.uibinder.UiBinder"/>
    Thanks a lot !! It works now !

  6. #6
    Sencha User
    Join Date
    Nov 2011
    Posts
    13
    Vote Rating
    0
    balakishan.r is on a distinguished road

      0  

    Default


    Hi, I tried with adding below line in module xml file but it is expecting UiBinder-bridge jar.
    I added this jar and able to see the tabs as expected.

    <inherits name="com.sencha.gwt.uibinder.UiBinder"/>
    <inherits name='com.google.gwt.uibinder.UiBinder' />

    Can any help me, is that the good approach to add this uibinder-bridge-2.4.0.jar?
    or is there any alternative to solve this issue.

    Thanks in advance.

  7. #7
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,639
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    That is required in GWT 2.4.0 - if you are using GXT 2.5.0, the uibinder-bridge.jar is no longer required, as GWT has included our code into the 2.5.0 release.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar