Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use Type Casting in JSF Expression Language

pradeep challaJul 11 2012 — edited Jul 13 2012
I have an attribute CategoryId in my VO of type oracle.jbo.domain.Number. I am trying to use the expression of Boolean item in JSF as #{row.CategoryId != 4}
Here is the JSF code:
                      <af:column id="s141NewItem3Col" noWrap="true" width="100"
                                 rowHeader="false">
                        <f:facet name="header">
                          <af:outputLabel value="CAtIDDeq4" showRequired="false"
                                          id="ol18"/>
                        </f:facet>
                        <af:inputText id="s141NewItem3"
                                      value="#{row.CategoryId != 4}"
                                      label="CAtIDDeq4" required="false"
                                      readOnly="#{((pageFlowScope.ContractRightCategoriesTable.newRow) and (!(jhsUserRoles['RM, ADMIN, AllButTitl, AllButAdmn']))) or ((!pageFlowScope.ContractRightCategoriesTable.newRow) and (!(jhsUserRoles['RM, ADMIN, AllButTitl, AllButAdmn'])))}"></af:inputText>
                      </af:column>
I am getting the run time exception as "Can not convert 4 of type class oracle.jbo.domain.Number to class java.lang.Long".

I am wondering how the row.CategoryId is treated as Long?. PLease advise. Also, will I be able to use type casting expressions in JSF Expression Language?

Thanks, Pradeep
This post has been answered by Navaneetha Krishnan Nataraj on Jul 11 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2012
Added on Jul 11 2012
7 comments
3,670 views