@Override public Object convertToKey( FacesContext context, String keyString, UIComponent component, Converter converter) { Object convertedKey = treeDataModel.convertToKey(context, keyString, component, converter); if (convertedKey != null) { final TreeRowKey treeRowKey = (TreeRowKey) convertedKey; try { walk( context, NULL_VISITOR, new TreeRange() { public boolean processChildren(TreeRowKey rowKey) { return rowKey == null || rowKey.isSubKey(treeRowKey); } public boolean processNode(TreeRowKey rowKey) { return this.processChildren(rowKey) || rowKey.equals(treeRowKey); } }, null); } catch (IOException e) { context.getExternalContext().log(e.getLocalizedMessage(), e); return null; } } return convertedKey; }