FileDocCategorySizeDatePackage
TreeTag.javaAPI DocExample2489Tue Jun 08 11:26:42 BST 2004com.mycompany.jsf.taglib

TreeTag

public class TreeTag extends javax.faces.webapp.UIComponentTag
This class is a tag handler that creates and configures a "com.mycompany.Tree" component with a "com.mycompany.Tree" renderer.
author
Hans Bergsten, Gefion Software
version
1.0

Fields Summary
private String
value
private String
var
private String
varNodeToggler
Constructors Summary
Methods Summary
public java.lang.StringgetComponentType()
Returns "com.mycompany.Tree".

	return "com.mycompany.Tree";
    
public java.lang.StringgetRendererType()
Returns "com.mycompany.Tree".

	return "com.mycompany.Tree";
    
protected voidsetProperties(javax.faces.component.UIComponent component)
Configures the component based on the tag handler property values.

        super.setProperties(component);

	FacesContext context = getFacesContext();
        if (value != null) {
	    ValueBinding vb = 
		context.getApplication().createValueBinding(value);
	    component.setValueBinding("value", vb);
        }
                
        if (var != null) {
	    ((UITree) component).setVar(var);
        }
                
        if (varNodeToggler != null) {
	    ((UITree) component).setVarNodeToggler(varNodeToggler);
        }
    
public voidsetValue(java.lang.String value)
Sets the component's value, which must be a JSF value binding expression for a "com.mycompany.jsf.model.TreeModel" or a "com.mycompany.jsf.model.TreeNode" instance.

        this.value = value;
    
public voidsetVar(java.lang.String var)
Sets the value of the "var" property, i.e., the name of the request scope variable that holds the current node being processed.

        this.var = var;
    
public voidsetVarNodeToggler(java.lang.String varNodeToggler)
Sets the value of the "varNodeToggler" property, i.e., the name of the request scope variable that holds an instance of a class with a toggleExpanded() action method that toggles the value of the "expanded" property for the node it's bound to.

        this.varNodeToggler = varNodeToggler;