= ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);
@Override
public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
final UITreeIcon image = (UITreeIcon) component;
final AbstractUIData data = ComponentUtils.findAncestor(image, AbstractUIData.class);
final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
final boolean folder = node.isFolder();
final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());
String source;
final String openSource;
final String closedSource;
final String imageUrl = (String) image.getValue();
if (imageUrl != null) { // application image
closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
} else { // theme image
closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
}