Manually Adding More Than Two Grid Columns Null Exception

2 posts, 0 answers
  1. StevenDom
    StevenDom avatar
    14 posts
    Member since:
    Aug 2014

    Posted 22 Aug 2014 Link to this post

    I am new to Kendo and I am testing out the grid functionality using the JSP tag library with the Grid control.

    In my Java code I am building up a List<Employees> and setting it as an attibute in the request. The Employee class is simple, being 

        private int EmployeeID;
        private int ManagerID;
        private String LastName;
        private String FirstName;

    with accompanying getters and setters.

    I am sending it to the JSP page using
         request.setAttribute( "theData", employees);

    I have successfully displayed the grid using the following tags in my JSP page.

                    <kendo:grid name="grid1" id="grid1"
                        sortable="true"
                        groupable="true">
                        <kendo:grid-pageable buttonCount="5" pageSize="5" info="true">
                        </kendo:grid-pageable>
                         
                        <kendo:dataSource data="${theData}">
                        </kendo:dataSource>
                        <kendo:grid-columns>
                            <kendo:grid-column field="firstName" title="First Name"   width="80px" />
                            <kendo:grid-column field="lastName" title="Last Name"  width="80px"/>
    <%--                         <kendo:grid-column field="employeeID" title="Employee ID"  /> --%>
    <%--                         <kendo:grid-column field="managerID" title="Manager ID"  /> --%>
                        </kendo:grid-columns>
                     </kendo:grid>

    I have also sucesfully displayed the grid if I remove the entire kendo:grid-columns tag. Therefore I know that my data path is wired up correctly.

    If I uncomment out either of the grid-columns (employeeID or managerID) the page throws a NullException error at

        at com.kendoui.taglib.BaseTag.setProperty(BaseTag.java:67)
        at com.kendoui.taglib.grid.ColumnTag.setField(ColumnTag.java:137)
         ...

    Any combination of two data columns displays as expected but adding a third or fourth one cases the exception. Is this something I am doing wrong? Is this a known issue with the JSP tag libraries?

    Thanks for any help you can provide.

    Steven

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Aug 2014 Link to this post

    Hello Steven,

    I tried to reproduce the problem to no avail. Find attached my test project exported as a WAR file.

    Regards,
    Atanas Korchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. UI for ASP.NET AJAX banner
Back to Top