This is a migrated thread and some comments may be shown as answers.

Manually Adding More Than Two Grid Columns Null Exception

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
StevenDom
Top achievements
Rank 1
StevenDom asked on 22 Aug 2014, 04:40 PM
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

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 Aug 2014, 02:22 PM
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!
 
Tags
Grid
Asked by
StevenDom
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or