|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.web.ThemeFunctionLibrary
public class ThemeFunctionLibrary
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 to guarantee that it works.
| Constructor Summary | |
|---|---|
ThemeFunctionLibrary()
|
|
| Method Summary | |
|---|---|
static Application |
application()
Returns a reference to the application object associated with the session that the call came from. |
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,
ApplicationServlet wa,
WebBrowser browser)
|
static String |
getCssLinksForHead()
Generates the links for CSS files to be included in html head. |
static int |
getFirstDayOfWeek()
Gets the name of first day of the week. |
static String |
getFormAction()
Gets Form Action URL for the requested window. |
static String |
getJavaScriptLinksForHead()
Generates the links for JavaScript files to be included in html head. |
static String |
getLocaleCountryId()
Returns the country and region code for current application locale. |
static String |
getLocaleLanguageId()
Returns the language code for current application locale. |
static String |
getMonth(int month)
Gets the name for month. |
static String |
getSecurityKey()
|
static String |
getShortMonth(int month)
Gets the short name for month. |
static String |
getShortWeekday(int dayOfWeek)
Gets the name for week day. |
protected static String |
getWindowRefreshScript(Application application,
Window window,
WebBrowser browser)
Generates the JavaScript for updating given window. |
static String |
getWindowTargetName()
Returns an unique target name for current window. |
static String |
getWindowTargetName(Application application,
Window window)
Returns an unique target name for a given window name. |
static String |
getWindowTargetName(String name)
Returns an unique target name for current window. |
static boolean |
probeClient()
Generates the JavaScript for page that performs client-side combility checks. |
static String |
resource(String resource)
Returns an URI to the named resource. |
static String |
resource(String resource,
String theme)
Returns an URI to the named resource from the named theme. |
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,
ApplicationServlet webAdapterServlet,
String theme)
|
static String |
theme()
Returns a reference to the current theme name that is associated with the session that the call came from. |
static Window |
window()
Returns a reference to the current window object associated with the session that the call came from. |
static String |
windowScript()
Generates the JavaScript for page header that handles window refreshing, opening and closing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThemeFunctionLibrary()
| Method Detail |
|---|
protected static void setState(Application application,
Window window,
WebBrowser webBrowser,
HttpSession session,
ApplicationServlet webAdapterServlet,
String theme)
application - window - webBrowser - session - webAdapterServlet - theme - protected static void cleanState()
public static Application application()
public static Window window()
public static WebBrowser browser()
public static HttpSession session()
public static String theme()
public static String resource(String resource,
String theme)
resource - theme - public static String resource(String resource)
resource - public static boolean probeClient()
public static String windowScript()
protected static String generateWindowScript(Window window,
Application app,
ApplicationServlet wa,
WebBrowser browser)
window - app - wa - browser -
public static String getWindowTargetName(Application application,
Window window)
application - window - the Name of the window.
public static String getWindowTargetName()
public static String getWindowTargetName(String name)
name - the name of the window.
public static String getLocaleCountryId()
Locale#getCountry()public static String getLocaleLanguageId()
Locale#getLanguage()public static int getFirstDayOfWeek()
public static String getShortWeekday(int dayOfWeek)
dayOfWeek - the Number of week day. 0 sunday, 1 monday, ...
public static String getShortMonth(int month)
month - the Number of month. 0 is January, 1 is February, and so on.
public static String getMonth(int month)
month - the Number of month. 0 is January, 1 is February, and so on.
public static String getFormAction()
This returns the action for the window main form. This action can be set through WebApplicationContect setWindowFormAction method..
public static String getSecurityKey()
public static String getCssLinksForHead()
public static String getJavaScriptLinksForHead()
protected static String getWindowRefreshScript(Application application,
Window window,
WebBrowser browser)
application - window - browser -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||