WOTextField to BigDecimal
WOTextField to BigDecimal
- Subject: WOTextField to BigDecimal
- From: John Pollard <email@hidden>
- Date: Sat, 19 Apr 2008 08:37:20 +0100
Hi List,
I am struggling with understanding this error:
java.lang.IllegalArgumentException: While trying to invoke the set
method "public void
beteee.app.components.StatsPage.setSellPrice(java.math.BigDecimal)" on
an object of type beteee.app.components.StatsPage we received an
argument of type java.lang.String. This often happens if you forget to
use a formatter.
I am trying to link a WOText field to a BigDecimal. Given a
WOTextField defined as follows:
sellPriceField: WOTextField {
size = 6;
value = sellPrice;
numberFormat = "###0.00";
}
and a method in the component:
public void setSellPrice(BigDecimal)
{...}
I find that WO isn't formatting the input for me before trying to set
the sellPrice variable.
What confuses me is that I can use the above method successfully if I
am binding to an EO attribute of type BigDecimal, but not when binding
to a variable or method within the component. Is my EOGenericrRecord
EO class somehow assisting to convert a string to a BigDecimal? How
best to get WOTextField to do the conversion, assign my own formatter?
Thanks for any help with this,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden