-
Notifications
You must be signed in to change notification settings - Fork 51
HeadTag
Stefaan Dutry edited this page Aug 26, 2022
·
4 revisions
The head tag renders required JavaScript code to configure jQuery and is required in order to use any of the tags included in the jQuery plugin.
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<sj:head/>
</head>
<body>
</body>
</html>
The locale attribute configures jQuery locale for datepicker, jqGrid and DataTables tags. Default is en you can use all locales that are bundled with jQuery. e.g. "de, "fr", "ja", ...
The default indicator is visible at every ajax request.
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<sj:head locale="de" jqueryui="true" defaultIndicator="myDefaultIndicator"/>
</head>
<body>
<img id="myDefaultIndicator" src="images/ajax-loader.gif" alt="Loading..." style="display:none"/>
</body>
</html>
Built in themes from Plugin
- black-tie
- blitzer
- cupertino
- dark-hive
- dot-luv
- eggplant
- excite-bike
- flick
- hot-sneaks
- humanity
- le-frog
- mint-choc
- overcast
- pepper-grinder
- redmond
- smoothness
- south-street
- start
- sunny
- swanky-purse
- trontastic
- ui-darkness
- ui-lightness
- vader
Sample usage:
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<sj:head locale="de" jqueryui="true" jquerytheme="redmond"/>
</head>
<body>
</body>
</html>
Create and download your own theme with jQuery ThemeRoller
- Create a folder in your WebRoot path template/themes/mytheme
- Extract downloaded theme and switch into the css folder
- Rename jquery-ui-x.x.x.custom.css to jquery-ui.css
- Copy jquery-ui.css and images folder into the template/themes/mytheme folder
Sample usage:
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<html>
<head>
<s:url var="context" value="/" />
<sj:head locale="de" jqueryui="true" jquerytheme="mytheme" customBasepath="%{context}template/themes"/>
</head>
<body>
</body>
</html>
ajaxcache | false | false | false | Boolean | If set to false it will force the pages that you request to not be cached by the browser. |
ajaxhistory | false | false | false | Boolean | If set to true it will enable history and bookmarking for AJAX content and jQuery UI Tabs. |
compressed | false | true | false | Boolean | use compressed version of jquery and jquery-ui |
customBasepath | false | false | String | base path for custom jQuery designs | |
debug | false | false | false | Boolean | enable debug logging |
defaultErrorText | false | false | String | The default error text for all AJAX actions | |
defaultIndicator | false | false | String | The default indicator for all AJAX actions | |
defaultLoadingText | false | false | String | The default loading text for all AJAX actions | |
jquerytheme | false | smoothness | false | String | jQuery UI theme |
jqueryui | false | true | false | Boolean | enable jQuery UI Scripts |
loadAtOnce | false | false | false | Boolean | do not use the on demand load for jquery ui resources |
loadFromCdn | false | false | false | Boolean | Load JavaScript from jQuery content distribution network |
locale | false | en or struts.local value | false | String | import jQuery i18n scripts. |
scriptPath | false | #your context root#/struts/ | false | String | path to the JavaScript ressources |
- Home
- Ajax
- UI widgets
- UI interactions
- Resizable for Divs
- Drag and Drop for Divs
- Selectable for Divs
- Sortable for Divs
- Form Elements
- Tasks