I'm having trouble finding the correct way to bind a number (instead
of a string) to a component like this:
<wo:ctextfield canEdit="$canEdit" value="$host" size="30" />
in this situation the binding size set to the string '30' which of
course will give this exception:
java.lang.IllegalArgumentException: While trying to set the field
"size" on an object of type CMSTextField we expected a
java.lang.Integer but received a java.lang.String with a value of 30.
This often happens if you forget to use a formatter.
<wo:ctextfield canEdit="$canEdit" value="$host" size="~30" />
in this situation the binding size is correctly set to the number 30,
but the following exception is thrown:
Caused by: ognl.InappropriateExpressionException: Inappropriate OGNL
expression: 30
<wo:ctextfield canEdit="$canEdit" value="$host" size="~(int)30" />
this causes ognl.ExpressionSyntaxException: Malformed OGNL expression:
(int)30
If you could point me in the right direction for casting/specifying
types I would be most great full.
Thanks,
Michael
<wo:whatever size = "$30"/>
is
Unnamed : whatever {
size = 30;
}
This is just like how you would also do $true, $false, and
$^someBinding.
ms
Had a different understanding of the $-sign. Makes perfect sense now.
Thanks,
Michael
On Aug 24, 3:01 pm, Mike Schrag <msch...@mdimension.com> wrote:
> try size = "$30". $ TECHNICALLY means, "evaluate this as if there
> were no quotes and this was in a wod file", so
>
> <wo:whatever size = "$30"/>
>
> is
>
> Unnamed : whatever {
> size = 30;
>
> }
>
> This is just like how you would also do $true, $false, and
> $^someBinding.
>
> ms
>