Converting ADF Number to Integer using EL
By Shay Shmeltzer-Oracle on Aug 11, 2011
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.
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
use something like:
And the conversion just works.
Special thanks to this blog entry for the tip.