Introduction
This function allows you to use the jQuery UI Button Widget for Links and Submit Buttons.
Samples
A Link as jQuery UI Button with Icon
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<sj:head jqueryui="true"/>
</head>
<body>
<sj:a id="ajaxlink"
href="%{ajaxurl}"
targets="result"
indicator="indicator"
button="true"
buttonIcon="ui-icon-refresh"
>
Run AJAX Action
</sj:a>
</body>
</html>A Submit Button as jQuery UI Button
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<sj:head jqueryui="true"/>
</head>
<body>
<sj:submit
targets="formResult"
value="AJAX Submit"
indicator="indicator"
button="true"
/>
</body>
</html>Attributes in Anchor and Submit Tag
Name |
Required |
Default |
Evaluated |
Type |
Description |
| button |
false |
false |
false |
Boolean |
jQuery UI Button |
| buttonIcon |
false |
|
false |
String |
Icons to display. The primary icon is displayed on the left of the label text. Value must be a classname (String), eg. ui-icon-gear. |
| buttonIconSecondary |
false |
|
false |
String |
Icons to display. The secondary icon is displayed on the right of the label text. Value must be a classname (String), eg. ui-icon-gear. |
<%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="sj" uri="/struts-jquery-tags"%> <html>
</html>FormResult? doesn't open the new page in the parent, is open a div target, not?
how to add List? as I want to display data from database.
UI is OK, but no icon is displayed with this tag, is there a bug ? <sj:submit button="true" buttonIcon="ui-icon-gear"/>
It's OK with this tag : <sj:a href="#" button="true" buttonIcon="ui-icon-gear">Search</sj:a>
Same problem with buttonIconSecondary attribute.
gfngdngd
how do we use the regular jquery-ui functions ? i mean, i want : $("img").button(); or $("input").button();
we