google-code-export / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

panel and region.getActivePanel() in a LayoutRegionListener always null #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have several CENTER panels in a Dialog, and when I select some tab, I
want to know the panel I selected: 
(...)
layout.getRegion(LayoutRegionConfig.CENTER).addLayoutRegionListener(new
LayoutRegionListener() {
  public boolean doBeforeRemove(final LayoutRegion region, final
ContentPanel panel) {}
  public void onCollapsed(final LayoutRegion region) {}
  public void onExpanded(final LayoutRegion region) {}
  public void onInvalidated(final LayoutRegion region) {}
  public void onPanelActivated(final LayoutRegion region, final
ContentPanel panel) {
    GWT.log("Region: " + region + ", panel: " + region.getActivePanel(), null);
  }     
  (...)
2. I get this logs:
  Region: com.gwtext.client.widgets.layout.LayoutRegion@5e3cc9, panel:
(null handle)

What is the expected output? What do you see instead?
  I expect a panel Id.

What version of the product are you using? On what operating system?
gwt-ext from SVN and gwt 1.4.59

Original issue reported on code.google.com by vruiz.ju...@gmail.com on 23 Aug 2007 at 3:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Did you try calling panel.getId()? 

GWT.log("Region: " + region + ", panel: " + region.getActivePanel().getId(), 
null);

Original comment by sanjiv.j...@gmail.com on 23 Aug 2007 at 3:21

GoogleCodeExporter commented 9 years ago
yes, with getId() works. You can close the issue.

Thanks for your fast answer.

Original comment by vruiz.ju...@gmail.com on 23 Aug 2007 at 4:00

GoogleCodeExporter commented 9 years ago

Original comment by sanjiv.j...@gmail.com on 23 Aug 2007 at 4:03