floating facebook button arrow left side

Tutorial jQuery with struts 2 Framework

How to use jQuery with struts 2 Framework

The client side scripting of HTML is simplified by designing a JavaScript library which is also compatible with all the browsers available for use. The JavaScript library is known as jQuery, and can be used very easily with Struts 2 Framework. It  supports  all types of browsers and is the most  popularly used JavaScript library these days. Use of jQuery with Struts2 framework includes navigating a document, selection of DOM elements, creation of animations, handling of events and last but not the least is development of AJAX  applications. You can use jQuery with Struts 2 Framework very easily.

Article Writing Services

A plug-in called Struts2 jQuery Plug in is available to make use of jQuery with Struts 2 Framework. It provides the first class and perfect support of AJAX CONTROL features to Struts 2 framework. The plug-in makes use of a JavaScript library called jQuery and many frameworks available like Struts 2 framework.

Basic usage of jQuery in Struts 2 Framework

If you want to make use of tags in struts2-jquery then:

1)      You need to download the struts-2-jquery-plugin jar file and include it in classpath of your application.

2)      Next step is to use the tag library of struts jQuery on jsp page of your application.

3)      Now you need to add <sj:head> tag into the head tag of jsp page.

There are number of tags/widgets that are implemented using struts2-jQuery plug-in.

1)      Head: It is the base tag to include the functionality of plugin in particular page.

2)      Anchor: It provides rendering to anchor by which it can execute ajax request, load content from remote source using ajax in any container and submit/validate particular form or its input elements.

3)      Div: used to render the div tab

4)      Form: used to render the form tag to submit content using ajax, perform validation, loading the output of post in any container.

5)      Select: used to render the select tag to load content remotely using ajax.

6)      Submit: used to render the submit tag

7)      Text: can render any text and update dynamically.

8)      TextField: used to render input tag box.

9)      TextArea: used to render textarea tag to add content remotely using ajax.

10)   Accordion: used to load menu remotely using ajax

11)  Date Picker: used to render datepicker

12)   Button: provides an attractive component of button.

13)  Dialog: provides all features of jQuery dialog.

14)  Tabbed Pane: used to Select/Enable/Focus tabs dynamically.

15)  Chart: provides very good dynamic capability to charts.

16)  Grid: provides the customizable component of grid.

Looking for Jquery,Struts, java etc  related projects , just grab from here Online Java Projects

Following is an example of the use of jQuery with Struts 2 Framework

Having support for datepicker component.

<html>
<head>
<script type=’text/javascript’>
$.subscribe(‘datepickerLoaded‘,function(event,data) {
$(“#datepickerStatus”).text(“Datepicker loaded”);
});
$.subscribe(‘datepickerSelectedDate‘,function(event,data) {
alert(“Datepicker selected date”);
});
$.subscribe(‘datepickerClosed‘,function(event,data) {
$(“#datepickerStatus”).text(“Datepicker closed”);
});
</script>
</head>

<body>
<div>
<label>Select Date:</label>
<sj:datepicker displayFormat=”MM/dd/yyyy” changeYear=”true” changeMonth=”true”/>
</div>
<label>Select Date:</label>
<sj:datepicker displayFormat=”yyyy-MM-dd” imageUrl=”images/datepicker.gif” imageTooltip=”Select Your Birthdate” showButton=”true” changeYear=”true” changeMonth=”true”/>
</div>
</body>

</html>

You can skip to the end and leave a response. Pinging is currently not allowed.

9 Responses to “Tutorial jQuery with struts 2 Framework”

  1. Tutorial jQuery with struts 2 Framework » KHMER855.COM says:

    [...] Originally posted here: Tutorial jQuery with struts 2 Framework [...]

  2. Tutorial jQuery with struts 2 Framework | Programming Blog Imagik.org says:

    [...] link: Tutorial jQuery with struts 2 Framework No [...]

  3. forex robot says:

    nice post. thanks.

  4. adult acne cleansers says:

    I’ve study a number of blogs around the previous number of many years, and I ought to say that this really is my favourite.

  5. Antony Guynn says:

    thanks because these explanation. i’m impressed that you have an known of all that, excellent post for Some nice content that you share on here.

  6. Johannes Geppert says:

    nice post. but you should place a tag inside of your head area.

  7. Willy Weiskopf says:

    I love it, this is just the thing I was looking for, hopefully there will be more of this on your website over time?

  8. Porno says:

    Thank you for the theme, background information, but too bad :)

  9. banhong says:

    Thank a lot.

    is a must need.

Leave a Reply