Shay Shmeltzer's Oracle Development Tools Tips

Converting ADF Number to Integer using EL

Shay Shmeltzer
Director of Product Management - Oracle

I spent about 20 minutes looking for this solution today - so I figured I'll just post this entry as a future reminder for myself...

I was using a Web Service data control that has an Integer parameter, and I wanted to get the value of EmployeeId from an ADF BC based ADF Faces table into it using an af:setProperty tag, but I got an error because the engine couldn't convert the jbo Number type to the needed Integer type.

Something like:

Cannot convert 203 of type class oracle.jbo.domain.Number to class java.lang.Integer
Turns out the solution is quite simple, add a .value to the end of the Number field EL.

So instead of 

                  <af:setPropertyListener from="#{row.EmployeeId}"



use something like:

                  <af:setPropertyListener from="#{row.EmployeeId.value}"

And the conversion just works.

Special thanks to this blog entry for the tip.

Join the discussion

Comments ( 3 )
  • guest Sunday, September 11, 2011


    In my EO key is of type oracle.jbo.domain.Number

    I am trying to use a setkey(myint) in a dodml().

    myint is an integer value. it errors out saying oracle.jbo.domain.Number cannot set with java.lang.Integer.

    Help please?

  • Shay Monday, September 12, 2011

    guest - hard to say without looking at your code and types - but maybe you need to convert your integer to Number - the Number type has constructor for this see the javadoc:


  • guest Thursday, December 19, 2013

    Hi Shay,

    How can we convert

    java.lang.Integer/Long to oracle.jbo.domain.Number using EL.



Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.