Tags:
create new tag
, view all tags
-- PedroRio - 22 Mar 2010

AttributeNumber

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.

Topic revision: r7 - 2011-11-17 - PedroRio
 

No permission to view TWiki.WebTopBar

This site is powered by the TWiki collaboration platform Powered by Perl

No permission to view TWiki.WebBottomBar