2 Replies Latest reply on Apr 16, 2014 2:54 AM by david hickman

    Error when using rich:columns

    david hickman Newbie

      Hi

       

      I am using Richfaces 3.3.3 and trying to implement an ExtendedDataTable to display data with a varying number of columns by adding the r:columns attribute to the table

       

      // Namespace declarations

      <%@ taglib uri="http://java.sun.com/jsf/html

        prefix="h" %>

      <%@ taglib uri="http://java.sun.com/jsf/core  prefix="f" %>
      <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax"     prefix="a" %>
      <%@ taglib uri="http://richfaces.org/rich"     prefix="r" %>

       

      // Snippet of page

      <r:extendedDataTable value="#{dmsBean.dataValues.rows}" var="row" width="#{dmsBean.tableWidth}">

                <r:columns value="#{dmsBean.columnHeadings}" var="column" index="ind" id="column#{ind}"  >

                         <f:facet name="header">

                              <h:outputText value="#{column}" />

                          </f:facet>

           </r:columns>

      </r:extendedDataTable>

       

      but when I run this I get the following error

       

      org.apache.jasper.JasperException: /dmsView.jsp(62,8) According to TLD or attribute directive in tag file, attribute id does not accept any expressions

       

      which presumably refers to the id attribute of r:columns

       

      Any help would be appreciated, looking at the example provided, this looks ok

       

      Message was edited by: david hickman

        • 1. Re: Error when using rich:columns
          Siva P Master

          Hi,

           

          Check with your TLD for a4j https://ajax4jsf.dev.java.net/ajax Its not accessible,

          Try using <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> in your page.

           

          Thanks,

          Siva

          • 2. Re: Error when using rich:columns
            david hickman Newbie

            Hi,

             

            I have changed this as requested but I still get the same issue

             

            For your info, the dmsBean.datamodel is an instance of a ListDataModel and the dmsBean.headings is a String[], are these the correct datatypes for this.

             

            Thanks for your interest

            David

             

             

            <r:panel id="datafileViewPanel" rendered="#{dmsBean.renderDatafile}" >

                 <r:extendedDataTable id="viewer" value="#{dmsBean.dataModel}" var="row">

                      <f:facet name="header" >

                           <h:outputText value="Import Data" />

                      </f:facet>

                      <r:columns value="#{dmsBean.headings}" var="heading" index="ind"  id="column#{ind}">

                           <f:facet name="header" >

                                <h:outputText value="#{heading}"/>

                           </f:facet>

                      </r:columns>

                 </r:extendedDataTable>