Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    63
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default UiBinder and ButtonGroup

    UiBinder and ButtonGroup


    I've been working on an interface using GXT3 and UiBinder, when I found a strange bug. I used ButtonGroup inside a toolbar in order to group buttons and to make the toolbar look better. This worked fine as long as I was debugging the application, but when I buildt a version for deployment, the application crashed at startup. I traced this back to when I added the ButtonGroup elements. When I removed these, the application run perfectly in its deploy version.

    The top of my UiBinder file follows:

    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:button="urn:import:com.sencha.gxt.widget.core.client.button"
        xmlns:toolbar="urn:import:com.sencha.gxt.widget.core.client.toolbar"
        xmlns:menu="com.sencha.gxt.ui.client.widget.menu"
        xmlns:container="urn:import:com.sencha.gxt.widget.core.client.container"
        xmlns:gxt="urn:import:com.sencha.gxt.widget.core.client"
        xmlns:form="urn:import:com.sencha.gxt.widget.core.client.form">
    
    
        <ui:with type="com.wis.diagram.gwt.shared.client.view.constant.PropertyConstants"
            field="constants" />
        <ui:with type="com.wis.diagram.gwt.shared.client.resources.icons.ClientIcons"
            field="icons" />
    
    
        <ui:with type="com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer.HorizontalLayoutData"
            field="buttonLayoutData">
            <ui:attributes width="32" height="32" />
        </ui:with>
    
    
        <g:VerticalPanel>
            <toolbar:ToolBar ui:field="toolBar">
    
    
                <!-- Logical properties -->
                <button:ButtonGroup headerVisible="false" height="80">
                    <g:Grid>
                        <g:row>
                            <g:customCell>
                                <container:HBoxLayoutContainer width="160">
                                    <button:TextButton ui:field="copy"
                                        icon="{icons.copy}"
                                        toolTip="{constants.copy}" />
                                    <button:TextButton ui:field="paste"
                                        icon="{icons.paste}"
                                        toolTip="{constants.paste}" />
                                    <button:TextButton ui:field="clearFormat"
                                        icon="{icons.clearFormat}"
                                        toolTip="{constants.clearFormat}" />
                                    <button:TextButton ui:field="serialize"
                                        icon="{icons.serialize}"
                                        toolTip="{constants.serialize}" />
                                    <button:TextButton ui:field="deserialize"
                                        icon="{icons.deserialize}"
                                        toolTip="{constants.deserialize}" />
                                </container:HBoxLayoutContainer>
                            </g:customCell>
                        </g:row>
                        <g:row>
                            <g:customCell>
                                <container:HBoxLayoutContainer width="160">
                                    <button:ToggleButton ui:field="grid"
                                        icon="{icons.grid}"
                                        toolTip="{constants.grid}"
                                        value="true" />
                                    <button:ToggleButton ui:field="readOnly"
                                        icon="{icons.unlocked}"
                                        toolTip="{constants.readOnly}" />
                                    <button:ToggleButton ui:field="overview"
                                        icon="{icons.overview}"
                                        toolTip="{constants.overview}" />
                                    <button:ToggleButton ui:field="stats"
                                        icon="{icons.stats}"
                                        toolTip="{constants.stats}" />
                                </container:HBoxLayoutContainer>
                            </g:customCell>
                        </g:row>
                    </g:Grid>
                </button:ButtonGroup>
    The problem can be fixed by simply removing the button group elements.

  2. #2
    Ext GWT Premium Member
    Join Date
    Jun 2010
    Location
    Kyrksæterøra, Norway
    Posts
    63
    Vote Rating
    2
    stigrv is on a distinguished road

      0  

    Default


    This seems to have been fixed in GXT 3.0.3.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Vote Rating
    88
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks for the update on this - no changes were made to ButtonGroup since before 3.0.1, nor its superclass, SimpleContainer, which also is the base class for many other containers. HBoxLayoutContainer did have some changes, mostly involved around when the container is not given an explicit size. This could be the case in your code, since you elements won't get a size (except for width on the HBoxLC) - the Grid is stopping explicit height from passing down from the ButtonGroup.

    That's about as far as I can speculate without knowing what you mean by 'crashing' (exception? did nothing?), and more details about how to run this and what it should look like/do.

Thread Participants: 1