ICEfaces
  1. ICEfaces
  2. ICE-1327

RowSelector Component Missing enabledOnUserRole/renderedOnUserRole Attributes

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Windows XP Professional

      Description

      The rowSelector component does not have the enabledOnUserRole or renderedOnUserRole attributes. I have an application where where users should be able to use the component or not depending on their role.

        Activity

        Hide
        Adnan Durrani added a comment -

        The component doesn't support disabled state, it could either be rendered or not rendered. So only renderOnUserRole applies on this component.

        Show
        Adnan Durrani added a comment - The component doesn't support disabled state, it could either be rendered or not rendered. So only renderOnUserRole applies on this component.
        Hide
        Adnan Durrani added a comment -

        renderedOnUserRole attribute added to the rowSelector component.

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\RowSelector.java
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-rowselector-props.xml
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-rowselector-props.xml
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\RowSelector.java
        Completed: At revision: 19228

        Show
        Adnan Durrani added a comment - renderedOnUserRole attribute added to the rowSelector component. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\RowSelector.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-rowselector-props.xml Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-rowselector-props.xml Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\RowSelector.java Completed: At revision: 19228
        Hide
        Joanne Bai added a comment -

        Tested on ICEfaces trunk revision 19228 + tomcat6

        The renderedOnUserRole does not seem to work properly. Here is what I found in the testing:
        1- setting it to true disables the row selector
        2- setting to false also disables the row selector
        3- if getting the value from backing bean, i.e. renderedOnUserRole="#

        {table.renderedOnUserRole}

        ", exception throws when the application is loaded (see below)

        Test application was checked into repo\qa\trunk\Regression\ICE-1327

        org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 3

        1: <html>
        2: <body>
        3: <jsp:forward page="/tableRowSelection.iface" />
        4: </body>
        5: </html>

        Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

        root cause

        javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: java.lang.ClassCastException:

        java.lang.Boolean cannot be cast to java.lang.String
        com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:162)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
        org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

        root cause

        java.lang.Exception: javax.faces.FacesException: java.lang.ClassCastException: java.lang.Boolean cannot be cast to

        java.lang.String
        com.icesoft.faces.context.View.servePage(View.java:152)
        com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
        com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
        com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:146)
        com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
        com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
        com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
        com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:49)
        com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
        com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:135)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
        org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

        Show
        Joanne Bai added a comment - Tested on ICEfaces trunk revision 19228 + tomcat6 The renderedOnUserRole does not seem to work properly. Here is what I found in the testing: 1- setting it to true disables the row selector 2- setting to false also disables the row selector 3- if getting the value from backing bean, i.e. renderedOnUserRole="# {table.renderedOnUserRole} ", exception throws when the application is loaded (see below) Test application was checked into repo\qa\trunk\Regression\ ICE-1327 org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 3 1: <html> 2: <body> 3: <jsp:forward page="/tableRowSelection.iface" /> 4: </body> 5: </html> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:162) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696) org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667) org.apache.jsp.index_jsp._jspService(index_jsp.java:57) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.Exception: javax.faces.FacesException: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String com.icesoft.faces.context.View.servePage(View.java:152) com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52) com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11) com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:146) com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16) com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:49) com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:135) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696) org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667) org.apache.jsp.index_jsp._jspService(index_jsp.java:57) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        Hide
        Joanne Bai added a comment -

        Problem reported last time by QA still exists.

        Show
        Joanne Bai added a comment - Problem reported last time by QA still exists.
        Hide
        Joanne Bai added a comment -

        ICE-5190 is created for it.

        Show
        Joanne Bai added a comment - ICE-5190 is created for it.

          People

          • Assignee:
            Adnan Durrani
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: