switching between two panels with hide/show mode but the parent element does not takes fit layout and not getting the scrollbar

2 views
Skip to first unread message

Nawal Mishra

unread,
Nov 18, 2009, 12:48:05 AM11/18/09
to GWT-Ext Developer Forum
The requirement gets satisfied if i remove/add panels, but not working
with hide/show panels. Need your help..

mallapu deepak

unread,
Nov 18, 2009, 1:07:25 AM11/18/09
to gwt...@googlegroups.com
can u be a bit more specific about our problem. i mean can u explain ur problem in detail if psbl with code...

On Wed, Nov 18, 2009 at 11:18 AM, Nawal Mishra <nawal.o...@gmail.com> wrote:
The requirement gets satisfied if i remove/add panels, but not working
with hide/show panels. Need your help..

--

You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-ext+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-ext?hl=.





--
Thanks and Regards,
Deepak Kumar Mallapu,
IT Associate,
Center for Education Technology and Learning Sciences,
IIIT-Hyderabad,
Mobile :9866976686.

Nawal Mishra

unread,
Nov 18, 2009, 1:42:40 AM11/18/09
to GWT-Ext Developer Forum
I have an editorgridPanel in my window when the application gets
loaded for the first time. Then i need to hide the panel and get it
replaced with corresponding dataview(images), fit inside a panel. The
problem which am facing is like when i do the switch, the scroll bar
moves off from the window. But the same does not happen if i remove
the gridPanel and add the new panel. But i cant remove the grid as i
need to switch back and forth and do not want to create it everytime.
code for switch from grid to dataview:

In Table component i do this

private void addListenerToThumbnailViewItem(Item thumbnailViewItem) {
thumbnailViewItem.addListener(new BaseItemListenerAdapter(){
public void onClick(BaseItem item, EventObject e) {
super.onClick(item, e);
//inThumbnailView=true;
//imageViewerHandle = new AtlantisImageViewerComponent();
AtlantisImageViewerComponent imageViewerComponent =
(AtlantisImageViewerComponent)getImageViewerHandle();
imageViewerComponent.setMainHandle(AtlantisTableComponent.this);
imageViewerComponent.setToolbarHandle
(AtlantisTableComponent.this.getToolbarComponent());
imageViewerComponent.setLoadingText
(AtlantisConstants.GENERIC_LOADINGTEXT_IMAGES);
imageViewerComponent.populateImages(builder);
}
});
}


Then in ImageViewerClass i write this piece of code:

if(tableComponent.getEditorGridPanel()!=null){
tableComponent.getEditorGridPanel().hide();
//tableComponent.getMainPanel().remove
(tableComponent.getEditorGridPanel());
}
Here the commented line works as desired, but i donot want this to
do. Why hiding removes the fitlayout from the parent window. Have
tried lots of things but it has not worked for me till the remove the
gridPanel and add the dataView.
Thanks for the quick response.


On Nov 18, 11:07 am, mallapu deepak <deepakm...@gmail.com> wrote:
> can u be a bit more specific about our problem. i mean can u explain ur
> problem in detail if psbl with code...
>
> On Wed, Nov 18, 2009 at 11:18 AM, Nawal Mishra <nawal.onmob...@gmail.com>wrote:
>
>
>
> > The requirement gets satisfied if i remove/add panels, but not working
> > with hide/show panels. Need your help..
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "GWT-Ext Developer Forum" group.
> > To post to this group, send email to gwt...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > gwt-ext+u...@googlegroups.com<gwt-ext%2Bunsu...@googlegroups.com>
> > .

Nawal Mishra

unread,
Nov 24, 2009, 3:27:30 AM11/24/09
to GWT-Ext Developer Forum
Finally i got a solution for my issue but i still donot know why
Fitlayout doesnot work when we have 2 panels inside a window of which
one is hidden.
Anyways i could progress, removing one panel and preparing the panel
again when required to show. it works fine..
Reply all
Reply to author
Forward
0 new messages