/**
* GENERATED FILE - DO NOT EDIT
*
*/
package org.richfaces.taglib;
import java.lang.String ;
import org.ajax4jsf.webapp.taglib.HtmlComponentTagBase ;
import javax.faces.component.UIComponent ;
import javax.el.ELException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.el.MethodExpression;
import javax.faces.el.MethodBinding;
import javax.faces.el.ValueBinding;
import javax.el.ValueExpression;
import org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor;
import org.richfaces.webapp.taglib.ValueBindingValueExpressionAdaptor;
import org.richfaces.component.html.HtmlSpacer;
public class SpacerTag extends org.ajax4jsf.webapp.taglib.HtmlComponentTagBase {
// Fields
/*
* height
* The height of the spacer defined in pixels. Default value is "1px".
*/
private ValueExpression _height;
/**
* The height of the spacer defined in pixels. Default value is "1px".
* Setter for height
* @param height - new value
*/
public void setHeight( ValueExpression __height ){
this._height = __height;
}
/*
* width
* The width of the spacer defined in pixels. Default value is "1px".
*/
private ValueExpression _width;
/**
* The width of the spacer defined in pixels. Default value is "1px".
* Setter for width
* @param width - new value
*/
public void setWidth( ValueExpression __width ){
this._width = __width;
}
public void release()
{
// TODO Auto-generated method stub
super.release();
this._height = null;
this._width = null;
}
/* (non-Javadoc)
* @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#setProperties(javax.faces.component.UIComponent)
*/
protected void setProperties(UIComponent component)
{
// TODO Auto-generated method stub
super.setProperties(component);
HtmlSpacer comp = (HtmlSpacer) component;
if (this._height != null) {
if (this._height.isLiteralText()) {
try {
java.lang.String __height = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._height.getExpressionString(),
java.lang.String.class);
comp.setHeight(__height);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("height", this._height);
}
}
if (this._width != null) {
if (this._width.isLiteralText()) {
try {
java.lang.String __width = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._width.getExpressionString(),
java.lang.String.class);
comp.setWidth(__width);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("width", this._width);
}
}
}
/* (non-Javadoc)
* @see javax.faces.webapp.UIComponentTag#getComponentType()
*/
public String getComponentType() {
// TODO Auto-generated method stub
return "org.richfaces.spacer";
}
/* (non-Javadoc)
* @see javax.faces.webapp.UIComponentTag#getRendererType()
*/
public String getRendererType() {
return "org.richfaces.SpacerRenderer";
}
}