|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.webadapter.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 go 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 java.lang.String |
generateWindowScript(Window window,
Application app,
WebAdapterServlet wa,
WebBrowser browser)
|
static int |
getFirstDayOfWeek()
Get name for week day. |
static java.lang.String |
getMonth(int month)
Get name for month. |
static java.lang.String |
getShortMonth(int month)
Get short name for month. |
static java.lang.String |
getShortWeekday(int dayOfWeek)
Get name for week day. |
protected static java.lang.String |
getWindowRefreshScript(Application application,
Window window,
WebBrowser browser)
Generate JavaScript for updating given window |
static java.lang.String |
getWindowTargetName()
Returns an unique target name for current window. |
static java.lang.String |
getWindowTargetName(Application application,
Window window)
Returns an unique target name for a given window name. |
static java.lang.String |
getWindowTargetName(java.lang.String name)
Returns an unique target name for current window. |
static boolean |
probeClient()
Generate JavaScript for page that performs client-side combility checks. |
static java.lang.String |
resource(java.lang.String resource)
Return an URI to the named resource. |
static java.lang.String |
resource(java.lang.String resource,
java.lang.String theme)
Return an URI to the named resource from the named theme. |
static javax.servlet.http.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,
javax.servlet.http.HttpSession session,
WebAdapterServlet webAdapterServlet,
java.lang.String theme)
|
static java.lang.String |
theme()
Return a reference to the current theme object 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 java.lang.String |
windowScript()
Generate 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, javax.servlet.http.HttpSession session, WebAdapterServlet webAdapterServlet, java.lang.String theme)
protected static void cleanState()
public static Application application()
public static Window window()
public static WebBrowser browser()
public static javax.servlet.http.HttpSession session()
public static java.lang.String theme()
public static java.lang.String resource(java.lang.String resource, java.lang.String theme)
public static java.lang.String resource(java.lang.String resource)
public static boolean probeClient()
public static java.lang.String windowScript()
protected static java.lang.String generateWindowScript(Window window, Application app, WebAdapterServlet wa, WebBrowser browser)
public static java.lang.String getWindowTargetName(Application application, Window window)
java.lang.IllegalStateException
- If application for window is null.public static java.lang.String getWindowTargetName()
public static java.lang.String getWindowTargetName(java.lang.String name)
java.lang.IllegalStateException
- If application for window is null.public static int getFirstDayOfWeek()
public static java.lang.String getShortWeekday(int dayOfWeek)
public static java.lang.String getShortMonth(int month)
public static java.lang.String getMonth(int month)
protected static java.lang.String getWindowRefreshScript(Application application, Window window, WebBrowser browser)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |