--
PedroRio - 22 Mar 2010
The
AttributeNumber component is used to store numeric values. If has properties to force minimum and maximum values.
Note: When you use the attributeNumber and store the value using the property valueExpression you create a getter and setter for the property value. These must accept and return a
BigDecimal value, you also need to set the displayValue property (you can set it to nothing, like displayValue="") because otherwise it will trigger an error.
Example:
Bean Code
private BigDecimal numberValue;
public BigDecimal getNumberValue();
public void setNumberValue(BigDecimal value){
numberValue = value;
}
Viewer Code
<xvw:attributeNumber valueExpression='#{viewBean.numberValue}' displayValue="">
If you use the xvw:attribute component and set the
inputType property to "
attributeNumber"
you can skip setting the "displayValue" property.