viktorthang / mgwt

Automatically exported from code.google.com/p/mgwt
Other
0 stars 0 forks source link

TabPanel with UIBinder throws exception #287

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create simple TabPanel with multiple tabs and uibinder
2. Try to compile or run in DevMode

What is the expected output? What do you see instead?
Expected output should be the view of the TabPanel. Instead there is an 
exception:
[DEBUG] [test] - Rebinding com.my.client.TabBarPanelPage.TabBARPanelPageUiBinder
    [DEBUG] [test] - Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
        [ERROR] [test] - Can only have one element per @UiChild parser tag.: <tab:Tab> (:30)

What version of the product are you using? On what operating system?
mgwt 1.1.2
GWT 2.4

Please provide any additional information below.

UIBinder template:

<!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:mgwt="urn:import:com.googlecode.mgwt.ui.client.widget"
    xmlns:tab="urn:import:com.googlecode.mgwt.ui.client.widget.tabbar">

    <g:VerticalPanel>
        <mgwt:HeaderPanel ui:field="header">
            <mgwt:center>
                <g:Label ui:field="headerLabel" />
            </mgwt:center>
            <mgwt:right>
                <mgwt:HeaderButton ui:field="syncHeaderButton" />
            </mgwt:right>
        </mgwt:HeaderPanel>
        <tab:TabPanel ui:field="tab">
            <tab:tabs>
                <tab:Tab>
                    <tab:button>
                        <tab:BookmarkTabBarButton/>
                    </tab:button>
                    <tab:widget>
                        <g:Label>Text 1</g:Label>
                    </tab:widget>
                </tab:Tab>
                <tab:Tab>
                    <mgwt:button>
                        <tab:BookmarkTabBarButton/>
                    </mgwt:button>
                    <mgwt:widget>
                        <g:Label>Text 1</g:Label>
                    </mgwt:widget>
                </tab:Tab>
            </tab:tabs>
        </tab:TabPanel>
    </g:VerticalPanel>
</ui:UiBinder> 

Original issue reported on code.google.com by stephan....@gmail.com on 13 Jan 2013 at 11:41

GoogleCodeExporter commented 8 years ago
Yep, here is the same

Original comment by marinaio...@gmail.com on 19 Feb 2013 at 1:26

GoogleCodeExporter commented 8 years ago
Try:
<tab:TabPanel ui:field="tab">
            <tab:tabs>
                <tab:Tab>
                    <tab:button>
                        <tab:BookmarkTabBarButton/>
                    </tab:button>
                    <tab:widget>
                        <g:Label>Text 1</g:Label>
                    </tab:widget>
                </tab:Tab>
                          </tab:tabs>
                          <tab:tabs>
                <tab:Tab>
                    <mgwt:button>
                        <tab:BookmarkTabBarButton/>
                    </mgwt:button>
                    <mgwt:widget>
                        <g:Label>Text 1</g:Label>
                    </mgwt:widget>
                </tab:Tab>
            </tab:tabs>
        </tab:TabPanel>

It seems weird, but it works...

Original comment by svensomm...@gmail.com on 19 Feb 2013 at 1:29

GoogleCodeExporter commented 8 years ago
:) thanks it works! :)

Original comment by marinaio...@gmail.com on 19 Feb 2013 at 1:41

GoogleCodeExporter commented 8 years ago

Original comment by kurka.da...@gmail.com on 13 Jul 2014 at 7:52