Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SimplePanel setWidget

    In vanilla GWT, there is SimplePanel class.

    It has a very useful feature - setWidget().
    Using setWidget I could dynamically change the widget of a panel.
    By having user click items on the menubar, it would switch the user to a particular "page" of the app without refreshing the page.

    However, SmartGWT has no setWidget feature.
    I could addMember, but then I can never assure that there is only widget, without going thro the remove procedures - and sometimes the remove just won't work.

    I have trouble emulating setWidget in Layout class.

    1. There is addMember(Widget) but no removeMember(Widget). How do I remove a widget? Why not provide a removeMember(Widget)?

    2. What is the difference between addMember and addChild?

    3. Is there an equiv of setWidget in Layout? If no, what would you advice that I use in place of SimplePanel to do the page switching that I need to perform?

    #2
    Umm well I don't think you've gone through the documentation very carefully. There is addMember() and removeMember() and everything in between. Depending on your app usually show(), hide() is a better option then trying to add and remove based on every user action.

    Comment

    Working...
    X