Re: Inline-Bindings, Integer Values
Re: Inline-Bindings, Integer Values
- Subject: Re: Inline-Bindings, Integer Values
- From: Fabian Peters <email@hidden>
- Date: Sun, 14 Sep 2014 23:26:32 +0200
Hi Thomas,
Just a wild guess, have you tried value = "$0"? That's the way inline bindings work for boolean values, e.g. value = "$false".
Fabian
Am 14.09.2014 um 21:50 schrieb Thomas Grass <email@hidden>:
> Hi to all,
>
> what is the right way to bind Integer values with inline bindings?
>
> I tried to bind 0 (zero) like this to a radio button:
>
>
> <wo:radioButton value = "0" selection="$addType" name="addType" />
>
> The problem is, that the number „0“ as value is not allowed, because it is in this case a string. The following exception will be displayed:
>
> "While trying to set the field "addType" on an object of type at.sampleproject.components.Sample we expected a java.lang.Integer but received a java.lang.String with a value of 0. This often happens if you forget to use a formatter."
>
>
> How can i tell the inline-bindings that 0 should be an Integer and not a String? I know that it would be possible to add 0 to a int-variable in the javaclass (f.e. int zero = 0;) and bind it with value=„$zero“ to it. But this is a thing I want to avoid.
>
>
> Thanks a lot,
>
> Thomas
> _______________________________________________
> 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
_______________________________________________
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