Changeset 50774894 in vaadin


Ignore:
Timestamp:
03/16/12 10:08:14 (2 years ago)
Author:
Artur Signell <artur@…>
Branches:
eeb956bc645a9c2aa3714747b7889e40bcca4d5f, 7.0, 7.1, 7.2
Children:
26c8a739
Parents:
6ff66f4a6
git-author:
Artur Signell <artur@…> (03/16/12 10:08:14)
git-committer:
Artur Signell <artur@…> (03/16/12 10:08:14)
Message:

Panel can have 0 children if its contents is hidden on server side

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/com/vaadin/terminal/gwt/client/ui/PanelConnector.java

    rfe227c09 r50774894  
    263263    public void connectorHierarchyChanged(ConnectorHierarchyChangedEvent event) { 
    264264        super.connectorHierarchyChanged(event); 
    265         // We always have 1 child, Panel takes care of ensuring content is never 
    266         // null 
    267         ComponentConnector newChild = getChildren().get(0); 
    268         Widget newChildWidget = newChild.getWidget(); 
     265        // We always have 1 child, unless the child is hidden 
     266        Widget newChildWidget = null; 
     267        if (getChildren().size() == 1) { 
     268            ComponentConnector newChild = getChildren().get(0); 
     269            newChildWidget = newChild.getWidget(); 
     270        } 
    269271 
    270272        getWidget().setWidget(newChildWidget); 
Note: See TracChangeset for help on using the changeset viewer.