TreeView JSP Tag Overview

The TreeView JSP tag is a server-side wrapper for the Kendo UI TreeView widget.

Telerik UI for JSP DevCraft image

The TreeView is part of Telerik UI for JSP, a professional grade UI library with 90+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Getting Started


Below are listed the steps for you to follow when configuring the Kendo UI TreeView for binding to data, passed as a model attribute in Spring MVC.

Step 1 Make sure you followed all the steps from the introductory article on Telerik UI for JSP.

Step 2 Create a new action method and pass the Category list to the View.

    @RequestMapping(value = "/local-data", method = RequestMethod.GET)
    public String index(Locale locale, Model model) {
        model.addAttribute("categories", categories.getList());

        return "web/treeview/local-data";

Step 3 Add the Kendo UI taglib mapping to the page.

    <%@taglib prefix="kendo" uri=""%>

Step 4 Add a server-bound TreeView.

    <kendo:treeView name="categoriesTreeView">
        <kendo:dataSource data="${categories}" />

Event Handling

Subscribe to Events

You can subscribe to all events exposed by Kendo UI TreeView by the handler name.

  <kendo:treeView name="categoriesTreeView" select="category_select">
      <kendo:dataSource data="${categories}" />

      function category_select) {
          // Handle the select event


Existing Instances

You are able to reference an existing TreeView instance via the Once a reference is established, you are able to use the TreeView API to control its behavior.

  // Put this after your Kendo UI TreeView tag declaration
  $(function() {
      // Notice that the name attribute of the treeview is used to get its client-side instance
      var treeview = $("#categoriesTreeView").data("kendoTreeView");

See Also

In this article