iadded
11 Sep 2011, 4:07 AM
Hi
I've been using GXT for the last 2 month to develop a small desktop-like application - and so far i am very pleased with it !!!
After looking at the examples and searching the forum - I need assistance implementing the following functionality :
I have a ViewPort set with 5 different components (1 in each area - each component extends ContentPanel).
Now - i want to load a different component in the center area (remove the existing component and add a different one).
I could not find any example doing that.
I wanted to try and remove the existing component - but i could not find a way to get the component that is currently loaded in the center area (the application will load different components into the area depending on the application state - so i need a way to "get" the current loaded component).
I even tried adding the components to the container using viewport.insert(widget, index, LayoutData) instead of viewport.add(widget) - assuming i can then use the index to get the widget that needs to be removed - but i received an IndexOutOfBound exception when inserting.
How can i set the index and retrive the component based on the set index ?
What is the "proper" solution for changing the component ?
Will appreciate any help
Inbal
I've been using GXT for the last 2 month to develop a small desktop-like application - and so far i am very pleased with it !!!
After looking at the examples and searching the forum - I need assistance implementing the following functionality :
I have a ViewPort set with 5 different components (1 in each area - each component extends ContentPanel).
Now - i want to load a different component in the center area (remove the existing component and add a different one).
I could not find any example doing that.
I wanted to try and remove the existing component - but i could not find a way to get the component that is currently loaded in the center area (the application will load different components into the area depending on the application state - so i need a way to "get" the current loaded component).
I even tried adding the components to the container using viewport.insert(widget, index, LayoutData) instead of viewport.add(widget) - assuming i can then use the index to get the widget that needs to be removed - but i received an IndexOutOfBound exception when inserting.
How can i set the index and retrive the component based on the set index ?
What is the "proper" solution for changing the component ?
Will appreciate any help
Inbal