Skip to content

Commit

Permalink
Review Window JSP tag docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Desislava Mihaylova committed Feb 16, 2016
1 parent 9667448 commit c6a4521
Showing 1 changed file with 56 additions and 29 deletions.
85 changes: 56 additions & 29 deletions docs/jsp/tags/window/overview.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
---
title: Overview
page_title: Overview | Window JSP Tag
description: "Get started with the Window JSP tag in Kendo UI."
slug: overview_window_uiforjsp
position: 1
---

# Window
# Window JSP Tag Overview

The Window JSP tag is a server-side wrapper for the [Kendo UI Window](/api/web/window) widget.
The Window JSP tag is a server-side wrapper for the [Kendo UI Window](/api/javascript/ui/window) widget.

## Getting Started

Here is how to configure a simple Kendo Window:
### Configuration

1. Make sure you have followed all the steps from the [Introduction](/jsp/introduction) help topic.
Below are listed the steps for you to follow when configuring the Kendo UI Window.

2. Create a new action method which renders the view:
**Step 1** Make sure you followed all the steps from the [introductory article on Telerik UI for JSP]({% slug overview_uiforjsp %}).

**Step 2** Create a new action method which renders the view.

###### Example

@RequestMapping(value = {"index"}, method = RequestMethod.GET)
public String index() {

return "web/window/index";
}

3. Add kendo taglib mapping to the page
**Step 3** Add the Kendo UI `taglib` mapping to the page.

###### Example

<%@taglib prefix="kendo" uri="http://www.kendoui.com/jsp/tags"%>

4. Add a window tag:
**Step 4** Add the `window` tag.

###### Example

<kendo:window name="window" title="About us" draggable="true" resizable="true">
<kendo:window-content>
Expand All @@ -33,12 +45,34 @@ Here is how to configure a simple Kendo Window:
</kendo:window-content>
</kendo:window>

## Accessing an Existing Window
## Event Handling

### Subscribe to Events

You can subscribe to all [events exposed by Kendo UI Window](/api/javascript/ui/window#events) by the handler name.

###### Example

<kendo:window name="window" orientation="horizontal" open="window_open" close="window_close">
</kendo:window>

You can reference an existing Window instance via [jQuery.data()](http://api.jquery.com/jQuery.data/).
Once a reference has been established, you can use the [API](/api/web/window#methods) to control its behavior.
<script>
function window_expand() {
// Handle the expand event
}

function window_collapse() {
// Handle the collapse event
}
</script>

### Accessing an existing Window instance
## Reference

### Existing Instances

You are able to reference an existing Window instance via the [`jQuery.data()`](http://api.jquery.com/jQuery.data/). Once a reference is established, you are able to use the [Window API](/api/javascript/ui/window#methods) to control its behavior.

###### Example

// Put this after your Kendo Window tag declaration
<script>
Expand All @@ -48,29 +82,22 @@ Once a reference has been established, you can use the [API](/api/web/window#met
});
</script>

## Loading the window contents through an asynchronous call
### Asynchronous Loading

You can load views asynchronously through the `content` attribute:
You are able to load views asynchronously through the `content` attribute.

<c:url value="/web/window/content" var="remoteUrl" />
The example below demonstrates how to load the contents of the Window by using an asynchronous call.

<kendo:window name="window" title="About us" content="${remoteUrl}" />
###### Example

## Handling Kendo UI Window events

You can subscribe to all [events](/api/web/window#events) exposed by Kendo UI Window:
<c:url value="/web/window/content" var="remoteUrl" />

### Subscribe by handler name
<kendo:window name="window" title="About us" content="${remoteUrl}" />

<kendo:window name="window" orientation="horizontal" open="window_open" close="window_close">
</kendo:window>
## See Also

<script>
function window_expand() {
// Handle the expand event
}
Other articles on Telerik UI for JSP and on the Window:

function window_collapse() {
// Handle the collapse event
}
</script>
* [Overview of the Kendo UI Window Widget]({% slug overview_kendoui_window_widget %})
* [Telerik UI for JSP API Reference Folder](/api/jsp/autocomplete/animation)
* [Telerik UI for JSP Tags Folder]({% slug overview_autocomplete_uiforjsp %})

0 comments on commit c6a4521

Please sign in to comment.