FileDocCategorySizeDatePackage
DataBarTag.javaAPI DocExample3155Tue Jun 08 11:26:42 BST 2004com.mycompany.jsf.taglib

DataBarTag

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

Fields Summary
private String
first
private String
rows
private String
value
private String
var
Constructors Summary
Methods Summary
public java.lang.StringgetComponentType()
Returns "javax.faces.Data".

	return "javax.faces.Data";
    
public java.lang.StringgetRendererType()
Returns "com.mycompany.Bar".

	return "com.mycompany.Bar";
    
public voidsetFirst(java.lang.String first)
Sets the value of the "first" property, i.e., the index for the first row in the component's model to process.

        this.first = first;
    
protected voidsetProperties(javax.faces.component.UIComponent component)
Configures the component based on the tag handler property values.

        super.setProperties(component);

	FacesContext context = getFacesContext();
        if (first != null) {
            if (isValueReference(first)) {
                ValueBinding vb = 
		    context.getApplication().createValueBinding(first);
                component.setValueBinding("first", vb);
            } else {
                ((UIData) component).setFirst(Integer.parseInt(first));
            }
        }

        if (rows != null) {
            if (isValueReference(rows)) {
                ValueBinding vb = 
		    context.getApplication().createValueBinding(rows);
                component.setValueBinding("rows", vb);
            } else {
                ((UIData) component).setRows(Integer.parseInt(rows));
            }
        }

        if (value != null) {
	    ValueBinding vb = 
		context.getApplication().createValueBinding(value);
	    component.setValueBinding("value", vb);
        }
                
        if (var != null) {
	    ((UIData) component).setVar(var);
        }
    
public voidsetRows(java.lang.String rows)
Sets the value of the "rows" property, i.e., the number of rows in the component's model to process.

        this.rows = rows;
    
public voidsetValue(java.lang.String value)
Sets the component's model value, which must be a JSF value binding expression for a "javax.faces.model.DataModel" instance or a data type for which there is a wrapper model. See the "javax.faces.component.UIData" class for details.

        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 row being processed.

        this.var = var;