• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WOTextField to BigDecimal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: WOTextField to BigDecimal
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: Re: IE SSL cache bug
  • Next by Date: Re: Removing extra blank lines from generated html?
  • Previous by thread: Re: IE SSL cache bug
  • Next by thread: Re: WOTextField to BigDecimal
  • Index(es):
    • Date
    • Thread