Thanks, that worked.

Simone Gianni wrote:

Hi Kamal,
the default value is parsed by the convertor. AFAIK the default convertor for the integer datatype is the formatting convertor, it obtains a number formatter in the normal java way, calling NumberFormat.getNumberInstance(locale). So if you get a null pointer exception maybe is because this method requiring a locale (javadocs does not specify, but it creates a DecimalFormaSymbols with the given locale, and that throws a null pointer exception). You should give the locale you use while typing the fd:initial-value, for example :

<fd:initial-value locale="it">1.000</fd:initial-value>

is a valid one thousand initial value, because in italy we separate thousands with a dot. Otherwise you can specify a plain convertor (since the plain convertor does not care about locales), but this will impact also on the format the field will have while displaying it or parsing it from the user.

<fd:datatype base="integer">
<fd:convertor type="plain"/>
</fd:datatype>

Simone

Kamal Bhatt wrote:


Jason Johnston wrote:

Kamal Bhatt wrote:
Hi
I have a field of datatype integer, I want set an initial value like so:

<fd:initial-value>1</fd:initial-value>

This is perfectly legitimate in regards to the validation. However, when I do this, I get null pointer exceptions on the line where I create the
form, ie

var form = new Form("cforms/promotion.xml");

What am I doing wrong?




This sounds familiar, I think I ran into it before... I think the
workaround was to specify a locale="" attribute.
Thanks for the reply, but that doesn't seem to be the answer. Do I need a convertor for this to work?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Kamal Bhatt

Tourism Technology Pty Ltd


T:  +61 (02) 9956 7300
F:  +61 (02) 9956 7411


Level 10, 1 Pacific Highway, North Sydney, NSW 2060


http://www.tt.com.au


--
Disclaimer: This email is confidential and may contain privileged information 
for the sole use of the person or business to which it is addressed. If you are 
not the intended recipient, please notify the sender by return e-mail or phone 
as you must not view, disseminate, distribute or copy this email without our 
consent. We do not accept any liability in connection with any computer virus, 
data corruption, incompleteness, or unauthorised amendment of this email. It is 
the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to