1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    akme247 is on a distinguished road

      0  

    Default [FIXED] Composite doesn't work as documented

    [FIXED] Composite doesn't work as documented


    Hi

    I'm new to GXT.

    I was trying out a simple sample as documented for the Composite.

    I copied the sample verbatim

    Code below

    Code:
    import com.extjs.gxt.ui.client.Style.Orientation;
    import com.extjs.gxt.ui.client.widget.Composite;
    import com.extjs.gxt.ui.client.widget.ContentPanel;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.layout.FitLayout;
    import com.extjs.gxt.ui.client.widget.layout.RowData;
    import com.extjs.gxt.ui.client.widget.layout.RowLayout;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class AppUI implements EntryPoint
    {
    
        public void onModuleLoad() {
              class TestComposite extends Composite {
                 public TestComposite() {
                   LayoutContainer c = new LayoutContainer();
                   c.setLayout(new RowLayout(Orientation.HORIZONTAL));
                   ContentPanel cp1 = new ContentPanel();
                   cp1.setHeading("Composite Test 1");
                   c.add(cp1, new RowData(.5, 1));
                   ContentPanel cp2 = new ContentPanel();
                   cp2.setHeading("Composite Test 2");
                   c.add(cp2, new RowData(.5, 1));
                   initComponent(c);
                 }
               }
               Viewport v = new Viewport();
               v.setLayout(new FitLayout());
               v.add(new TestComposite());
               RootPanel.get().add(v);
             }
    }
    This code above fails with the following exception on the Hosted Mode console

    Code:
    java.lang.AssertionError: Method must be called after the component is rendered
        at com.extjs.gxt.ui.client.widget.Component.assertAfterRender(Component.java:1170)
        at com.extjs.gxt.ui.client.widget.Component.el(Component.java:389)
        at com.extjs.gxt.ui.client.widget.LayoutContainer.onRender(LayoutContainer.java:304)
        at com.extjs.gxt.ui.client.widget.Composite.onRender(Composite.java:142)
        at com.extjs.gxt.ui.client.widget.Component.render(Component.java:812)
        at com.extjs.gxt.ui.client.widget.Layout.renderComponent(Layout.java:237)
        at com.extjs.gxt.ui.client.widget.Layout.renderAll(Layout.java:228)
        at com.extjs.gxt.ui.client.widget.Layout.onLayout(Layout.java:212)
        at com.extjs.gxt.ui.client.widget.layout.FitLayout.onLayout(FitLayout.java:55)
        at com.extjs.gxt.ui.client.widget.Layout.layout(Layout.java:91)
        at com.extjs.gxt.ui.client.widget.Container.doLayout(Container.java:348)
        at com.extjs.gxt.ui.client.widget.Container.layout(Container.java:443)
        at com.extjs.gxt.ui.client.widget.LayoutContainer.layout(LayoutContainer.java:238)
        at com.extjs.gxt.ui.client.widget.Container.onAttach(Container.java:454)
        at com.extjs.gxt.ui.client.widget.Viewport.onAttach(Viewport.java:110)
        at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:231)
        at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:119)
        at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:86)
        at com.google.gwt.user.client.ui.AbsolutePanel.add(AbsolutePanel.java:80)

  2. #2
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    akme247 is on a distinguished road

      0  

    Default


    I should mention - I am using GXT 1.2.2, GWT 1.5.3, and JDK 1.6

    - akme

  3. #3
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    akme247 is on a distinguished road

      0  

    Default


    Looks like a bug to me.

    Assertions are turned on in Hosted Mode but are turned off in Web Mode.

    This exception does not happen in the Web Mode.

    When can we have a fix for this (in a release)? Not working in Hosted Mode defeats the purpose of debugging/developing GWT based applications.

    Thanks in advance.

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    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


    This is already fixed in SVN.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."