code: public void onLeafClick(LeafClickEvent event) {
  		LayerTreeTreeNode layerTreeNode;
  		if (event.getLeaf() instanceof LayerTreeLegendItemNode) {
  			layerTreeNode = ((LayerTreeLegendItemNode) event.getLeaf()).parent;
  			treeGrid.deselectRecord(event.getLeaf());
  			treeGrid.selectRecord(layerTreeNode);
  		} else {
  			layerTreeNode = (LayerTreeTreeNode) event.getLeaf();
  		}
  
  		// -- update model
  		mapModel.selectLayer(layerTreeNode.getLayer());
  	}
docs: When a legendItem is selected, select the layer instead.
  
  @param event
  event