Version 2.4.0 of
Struts2 jQuery Plugin is now available with a lot of new features an improvments.
Now there exists a new Chart Modul which is based on the popular
jquery flot project. The new
chart tag renders a chart with data given from a list or an ajax source. Checkout the new examples in the
Showcase (More Widgets).
<h3>Chart with AJAX Data</h3>
<s:url id="chartDataUrl" action="json-chart-data"/>
<sjc:chart id="chartAjax"
legendLabelBoxBorderColor="#990033"
legendPosition="ne"
legendShow="#ccc"
cssStyle="width: 600px; height: 400px;"
>
<sjc:chartdata label="Map -Double, Double-"
href="%{chartDataUrl}"
list="doubleMap"
deferredLoading="true"
reloadTopics="reloadMap"
/>
<sjc:chartdata label="List -ListValue-"
href="%{chartDataUrl}"
list="objList"
listKey="myKey"
listValue="myValue"
reloadTopics="reloadList"
/>
</sjc:chart>
<sj:a onClickTopics="reloadMap" button="true" buttonIcon="ui-icon-refresh">Load/Reload Map</sj:a>
<sj:a onClickTopics="reloadList" button="true" buttonIcon="ui-icon-refresh">Reload List</sj:a> |

An other new feature is the
spinner tag which renders you a simple but usefully spinner for your forms.
<h3>A simple Spinner</h3>
<sj:spinner name="spinner1" id="spinner1"/>
<br />
<br />
<h3>A Spinner max=50 and step=2</h3>
<sj:spinner name="spinner2"
id="spinner2"
min="5"
max="50"
step="2"
value="25"/>
<br />
<br />
<h3>A Spinner with currency format and mouse wheel support</h3>
<sj:spinner name="spinner3"
id="spinner3"
min="0.00"
max="5.00"
step="0.15"
value="2.50"
suffix="$"
mouseWheel="true"/> |

With this version it is also possible to generate your action messages in jquery UI style, dependend on your theme.
<h3>Action Error</h3>
<s:actionerror theme="jquery"/>
<br />
<h3>Action Message</h3>
<s:actionmessage theme="jquery"/>
<br />
<h3>Field Errors</h3>
<s:fielderror theme="jquery"/> |

jQuery UI is now based on the last
stable version 1.8.4 with a lot of bugfixes. When using an own theme, it is recommended to create or update the theme with the themeroller. Also the ckeditor is updated to
new version 3.4 with some new plugins and some bugfixes.
For a complete list of changes since last version, please visit the
Changelog.
Download:
http://code.google.com/p/struts2-jquery/downloads/list
Showcase:
http://struts.jgeppert.com/struts2-jquery-showcase/
Issues:
http://code.google.com/p/struts2-jquery/issues/list
User Group:
http://groups.google.com/group/struts2-jquery
Tags: chart, flot, jQuery, jqueryui, spinner, struts2
5 Comments »