Hello!

What does this error mean:

/pages/admin/references/services/edit.xhtml @72,0 
value="#{serviceform.periodicService.price}": Exception setting property price 
of base with class ru.tagnet.beans.references.services.PeriodicService

It ocurred what I use
<f:convertNumber pattern="#{bundle['formats.currency.2d']}"/>
on h:inputText. formats.currency.2d == #,##0.00 and input field is of class 
java.math.BigDecimal

Hi Boris,
Check your server error logs to see if there is more detail from an underlying exception.

My guess is, f:convertNumber isn't playing nicely with the setter for BigDecimal, and there is a ClassCastException or NoSuchMethodException somewhere.

You could change your getter/setter to take/return a java.lang.Number instead, for example

private BigDecimal price;
public Number getPrice() {
  return price;
}
public void setPrice(Number n) {
  if (n instanceof BigDecimal)
    price = (BigDecimal) n;
  } else {
    price = new BigDecimal(n.doubleValue());
  }
}

that way, if the convert tries to pass in a Double instead, it gets converted in your setter.

hope this helps,

-- Bill
--
Bill Schneider
Chief Architect

Vecna Technologies, Inc.
5004 Lehigh Road
College Park, MD 20740
[EMAIL PROTECTED]
t: 240-737-1640
f: 301-699-3180

Reply via email to