| java.lang.Object org.millstone.webadapter.ThemeFunctionLibrary
ThemeFunctionLibrary | public class ThemeFunctionLibrary (Code) | | This a function library that can be used from the theme XSL-files. It provides
easy access to current application, window, theme, webbrowser and session. The
internal threadlocal state must be maintained by the webadapter in order go guarantee
that it works.
author: IT Mill Ltd. version: 3.1.1 since: 3.0 |
Method Summary | |
public static Application | application() Returns a reference to the application object associated
with the session that the call came from. | public static WebBrowser | browser() Returns a reference to the browser object associated
with the session that the call came from. | protected static void | cleanState() | protected static String | generateWindowScript(Window window, Application app, WebAdapterServlet wa, WebBrowser browser) | public static int | getFirstDayOfWeek() Get name for week day.
Parameters: Number - of week day. | public static String | getFormAction() Get Form Action URL for the requested window.
This returns the action for the window main form. | public static String | getLocaleCountryId() Returns the country and region code for current application locale. | public static String | getLocaleLanguageId() Returns the language code for current application locale. | public static String | getMonth(int month) Get name for month.
Parameters: Number - of month. | public static String | getShortMonth(int month) Get short name for month.
Parameters: Number - of month. | public static String | getShortWeekday(int dayOfWeek) Get name for week day.
Parameters: Number - of week day. | protected static String | getWindowRefreshScript(Application application, Window window, WebBrowser browser) | public static String | getWindowTargetName(Application application, Window window) Returns an unique target name for a given window name.
Parameters: windowName - Name of the window. | public static String | getWindowTargetName() Returns an unique target name for current window. | public static String | getWindowTargetName(String name) Returns an unique target name for current window. | public static boolean | probeClient() Generate JavaScript for page that performs
client-side combility checks. | public static String | resource(String resource, String theme) Return an URI to the named resource from the named theme. | public static String | resource(String resource) Return an URI to the named resource. | public static HttpSession | session() Returns a reference to the current servlet http session object
that is associated with the session that the call came from. | protected static void | setState(Application application, Window window, WebBrowser webBrowser, HttpSession session, WebAdapterServlet webAdapterServlet, String theme) | public static String | theme() Return a reference to the current theme object that is
associated with the session that the call came from. | public static Window | window() Returns a reference to the current window object associated
with the session that the call came from. | public static String | windowScript() Generate JavaScript for page header that handles
window refreshing, opening and closing. |
application | public static Application application()(Code) | | Returns a reference to the application object associated
with the session that the call came from.
|
browser | public static WebBrowser browser()(Code) | | Returns a reference to the browser object associated
with the session that the call came from.
|
cleanState | protected static void cleanState()(Code) | | |
getFirstDayOfWeek | public static int getFirstDayOfWeek()(Code) | | Get name for week day.
Parameters: Number - of week day. 0 first day of week. Name of week day in applications current locale. |
getFormAction | public static String getFormAction()(Code) | | Get Form Action URL for the requested window.
This returns the action for the window main form. This action
can be set through WebApplicationContect setWindowFormAction method..
Form action for the current window. |
getLocaleCountryId | public static String getLocaleCountryId()(Code) | | Returns the country and region code for current application locale.
See Also: Locale.getCountry language Country code of the current application locale. |
getLocaleLanguageId | public static String getLocaleLanguageId()(Code) | | Returns the language code for current application locale.
See Also: Locale.getLanguage language Language code for current application locale. |
getMonth | public static String getMonth(int month)(Code) | | Get name for month.
Parameters: Number - of month. 0 is January, 1 is February, and so on. Name of month in applications current locale. |
getShortMonth | public static String getShortMonth(int month)(Code) | | Get short name for month.
Parameters: Number - of month. 0 is January, 1 is February, and so on. Name of month in applications current locale. |
getShortWeekday | public static String getShortWeekday(int dayOfWeek)(Code) | | Get name for week day.
Parameters: Number - of week day. 0 sunday, 1 monday, ... Name of week day in applications current locale. |
getWindowTargetName | public static String getWindowTargetName(Application application, Window window)(Code) | | Returns an unique target name for a given window name.
Parameters: windowName - Name of the window. An unique ID for window target throws: IllegalStateException - If application for window is null. |
getWindowTargetName | public static String getWindowTargetName()(Code) | | Returns an unique target name for current window.
An unique ID for window target |
getWindowTargetName | public static String getWindowTargetName(String name)(Code) | | Returns an unique target name for current window.
An unique ID for window target throws: IllegalStateException - If application for window is null. |
probeClient | public static boolean probeClient()(Code) | | Generate JavaScript for page that performs
client-side combility checks.
The script includes HTML/JavaScript commands to be included
in the body of the millstone-form.
|
resource | public static String resource(String resource, String theme)(Code) | | Return an URI to the named resource from the named theme.
|
resource | public static String resource(String resource)(Code) | | Return an URI to the named resource.
|
session | public static HttpSession session()(Code) | | Returns a reference to the current servlet http session object
that is associated with the session that the call came from.
|
theme | public static String theme()(Code) | | Return a reference to the current theme object that is
associated with the session that the call came from.
|
window | public static Window window()(Code) | | Returns a reference to the current window object associated
with the session that the call came from.
|
windowScript | public static String windowScript()(Code) | | Generate JavaScript for page header that handles
window refreshing, opening and closing.
Generates script that:
- Requests that all windows that need repaint be reloaded
- Sets the window name
- Closes window if it is set to be closed
|
|
|