Tuesday, September 23, 2014

Check Equals Ignore case in EL expression in JSF/ADF


Step1: Add the below highlighted library

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:fn="http://java.sun.com/jsp/jstl/functions"
          xmlns:c="http://java.sun.com/jsp/jstl/core">
        

Step2: Check the condition as below
         
<af:image shortDesc="Status Open"
        id="i7"
        rendered="#{fn:toLowerCase(sessionScope.status) == fn:toLowerCase('open')}
        source="/images/status-open.png"/>

2 comments:

  1. Hi Vinay,

    I am facing the following issue using this approach. Can you please help me out ?

    javax.el.ELException: Expression uses functions, but no FunctionMapper was provided

    ReplyDelete
  2. Make sure that you add namespace as mentioned in step1 !!

    ReplyDelete