myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: Trouble converting String to boolean in JSF
Date Thu, 01 Oct 2009 20:27:09 GMT
"x == y" is a read-only expression, and probably isn't allowed for a
value in <h:selectBooleanCheckbox>.

Why not use value="#{emailController.fields.addToENews}"?

This assumes that 'fields' has a getter for an addToENews property.

On Thu, Oct 1, 2009 at 1:14 PM, laredotornado <laredotornado@gmail.com> wrote:
>
> Thanks for your reply but that didn't work.  I changed to what you specified
> but still get the error
>
> Parsed Expression of unsupported type for this operation. Expression class:
> org.apache.commons.el.BinaryOperatorExpression. Expression:
> '#{emailController.fields.addToENews == true}'
>
> upon submitting my form.  Any other advice is appreciated, - Dave
>
>
>
> Anton Gavazuk wrote:
>>
>> <h:selectBooleanCheckbox value="#{emailController.fields.addToENews
>> ==true}"
>> />
>>
>> 2009/10/1 laredotornado <laredotornado@gmail.com>
>>
>>>
>>> Hi,
>>>
>>> I'm using MyFaces 1.1 for a web app deployed in Resin 3.0.19.  This is
>>> the
>>> expression I have ...
>>>
>>> <h:selectBooleanCheckbox value="#{emailController.fields.addToENews ==
>>> 'true'}" />
>>>
>>> but when I submit my page containing this, I get the error
>>>
>>> Parsed Expression of unsupported type for this operation. Expression
>>> class:
>>> org.apache.commons.el.BinaryOperatorExpression. Expression:
>>> '#{emailController.fields.addToENews == 'true'}'
>>>
>>> Any ideas how I can rewrite the expression to produce the desired result?
>>> Essentially I'm trying to convert a string to a boolean within JSF.
>>>
>>> Thanks, - Dave
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Trouble-converting-String-to-boolean-in-JSF-tp25696928p25696928.html
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Trouble-converting-String-to-boolean-in-JSF-tp25696928p25703041.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message