Results 1 to 2 of 2

Thread: TabPanel : Widgets are rendered differentlyy if there are in active tab or not

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Vote Rating
    0
      0  

    Default TabPanel : Widgets are rendered differentlyy if there are in active tab or not

    Version(s)
    GXT 3.0.1

    Browser versions and OS
    • Firefox, Windows XP

    Virtual Machine
    No

    Description
    I made a TabPanel and filling with tabs containing composite Widget.
    My need is to fill the tabpanel on tabs (the number and content depends on the user logged in the application)
    The widget in the initial active tab is correctly rendered but when I open other tabs, the tab are not correctly rendered.

    Run mode
    Development mode

    Steps to reproduce the problem To reproduce this problem, I made a sample code with a first screen (coming from MVP implementation) which contains only one TabPanel.
    To this tabpanel, I add two tabs containing two instance of the same custom widget.

    Active Tab is well rendered.
    Inactive Tab is not well rendered

    Java code for screen containing tabpanel
    Code:
    public class MainViewImpl extends Composite implements MainView {
     
     interface ViewUiBinder extends UiBinder<Widget, MainViewImpl> {
     }
     private ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class);
     
     @UiField
     TabPanel mainPanel;
    
     public MainViewImpl() {
      initWidget(uiBinder.createAndBindUi(this));
      mainPanel.setAnimScroll(true);
      mainPanel.setTabScroll(true);
      mainPanel.add(new ActivityWidget(),"Tab1");
      mainPanel.add(new ActivityWidget(),"Tab2");
     }
     
    }
    Xml for binding
    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:gxt="urn:import:com.sencha.gxt.widget.core.client"
     xmlns:container="urn:import:com.sencha.gxt.widget.core.client.container">
     <!-- Feuille de style du framework BluePrint -->
     <ui:with type="com.cacf.magellan.gwt.client.resource.BluePrint"
      field="fwk"></ui:with>
     <ui:style>
      /* Style spcifique  l'cran */
      .sep {
            margin-top: 20px;
         }
     </ui:style>
     
     <g:HTMLPanel styleName="{fwk.style.container}" height="500" width="950">
      <container:FlowLayoutContainer>
       <gxt:TabPanel ui:field="mainPanel" height="500" width="950" addStyleNames="margin-10" />
       </container:FlowLayoutContainer>
     </g:HTMLPanel>
    </ui:UiBinder> 
    Java code for composite widget
    Code:
    public class ActivityWidget extends Composite{
     
      
     //Vue
     private static ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class);
     interface ViewUiBinder extends UiBinder<Widget, ActivityWidget> {
     }
     
     public ActivityWidget(){
      initWidget(uiBinder.createAndBindUi(this));
      
     }
     
     
     
    }
    Xml for binding
    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:gxt="urn:import:com.sencha.gxt.widget.core.client"
     xmlns:container="urn:import:com.sencha.gxt.widget.core.client.container"> 
    <container:HorizontalLayoutContainer width="950" height="500">
     <container:FlowLayoutContainer width="530" height="500">
      <gxt:FramedPanel ui:field="activityPanel" headingText="Activits" width="530" height="380" addStyleNames="margin-10">
      </gxt:FramedPanel>
     </container:FlowLayoutContainer>
     <container:FlowLayoutContainer width="530" height="500">
      <gxt:FramedPanel ui:field="activityDnisPanel" headingText="Numros DNIS associs  l'activit" width="400" height="380" addStyleNames="margin-10" enabled="false">
      </gxt:FramedPanel>
     </container:FlowLayoutContainer>
    </container:HorizontalLayoutContainer> 
    </ui:UiBinder> 

    Here is a screenshot of the result :
    screenshot.jpg


    1. Expected result
      The two tabs should be rendered identically.
      Actual result
      The two tabs are not rendered identically


      Thanks,
      Thomas

  2. #2
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Vote Rating
    0
      0  

    Default

    Hello,

    I think it is not a bug.

    I find a solution.
    My custom composite have to implement ProvidesResize and RequiresResize.

    Thomas

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
  •