1. #1
    Ext User
    Join Date
    May 2008
    Posts
    4
    Vote Rating
    0
    romerun is on a distinguished road

      0  

    Default Widget did not show up - doing inside event.

    Widget did not show up - doing inside event.


    Hi,

    I'm trying to adding/removing widget from LayoutContainer when user clicks a button, but after removing old widgets and adding a new one, it won't show up, seems like it wasn't rendered, hm..

    public void onModuleLoad() {
    final Viewport viewport = new Viewport();
    final LayoutContainer content = new LayoutContainer();
    Button bbb = new Button("bbb");
    bbb.addListener(Events.OnClick, new Listener<ComponentEvent> () {
    public void handleEvent(ComponentEvent ce) {
    content.removeAll();
    Button ccc = new Button("ccc");
    content.add(ccc);

    // I expected to see the ccc button, but see a blank page instead.
    }
    });
    content.add(bbb);

    viewport.add(content);
    RootPanel.get().add(viewport);
    }
    However, if those code is outside the event, it works as expected.

    extgwt - beta3
    gwt-1.5rc1

    Thank you

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    Ok, two things...

    1) call content.layout() in the selection event and it should showup. The reason is that before render there is no need to call layout. After render (in the event queue) you need to call layout to get things rendered again.

    2) you really should be using GWT1.5 M2 as RC1 is not supported - certain things don't work. A version supporting RC1 is scheduled in the next few days.

  3. #3
    Ext User
    Join Date
    May 2008
    Posts
    4
    Vote Rating
    0
    romerun is on a distinguished road

      0  

    Default


    Thank you ! .layout(true) does the job, I've been fighting with this for 2 days.!

Thread Participants: 1

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