The MyFaces implementation also returns a Long value for #{0}. The JSF spec refers to the JSP 2.0 spec which suggests the value could be a Long or BigInteger as the result of an integer expression. Therefore this suggests that the cast should be to Number in both HtmlRadio and HtmlCheckbox. I will raise a bug.

Peter

Sean Schofield wrote:

Don't know since I haven't tried it with either.  Why don't you try it
with MyFaces impl to see if it works as you expect?  If it doesn't
then report it as a bug in JIRA and someone will take a look.  I'd
also check the spec to see if this isn't the specified behavior.

sean

On Apr 12, 2005 11:45 AM, Peter Mahoney <[EMAIL PROTECTED]> wrote:


There seems to be a problem using the x:radio component with the RI. I
am using a dataTable to list each of the options, one per row. I
therefore need to use an expression to provide the index attribute. The
RI resolves the value of the expression to a Long, however HtmlRadio
casts the value of the expression to an Integer. The RI returns a Long
value for the expression #{0}. As a fix, I have changed the cast to Number:

       Number v = vb != null ? (Number)vb.getValue(getFacesContext()) :
null;

Is this a bug with the RI or MyFaces?

Thanks

Peter







Reply via email to