org.zkoss.zk.fn
Class ZkFns

java.lang.Object
  extended by org.zkoss.zk.fn.ZkFns

public class ZkFns
extends java.lang.Object

Utilities for using EL.

Author:
tomyeh

Constructor Summary
protected ZkFns()
           
 
Method Summary
static java.lang.String outLangJavaScripts(java.lang.String action)
          Returns HTML tags to include all JavaScript files and codes that are required when loading a ZUML page.
static java.lang.String outLangStyleSheets()
          Returns HTML tags to include all style sheets that are defined in all languages.
static java.lang.String outLocaleJavaScript()
          Generates Locale-dependent strings in JavaScript syntax.
static java.lang.String outPageHeaders(Page page)
          Returns HTML header elements of the specified page.
static java.lang.String outResponseJavaScripts(java.util.Collection responses)
          Returns JavaScript for handling the specified response.
static void redraw(Component comp, java.io.Writer out)
          Redraw the specified component into the specified out.
static java.lang.String toAbsoluteURI(java.lang.String uri)
          Converts the specified URI to absolute if not included by another page.
static java.lang.String toAbsoluteURI(java.lang.String uri, boolean skipInclude)
          Converts the specified URI to absolute if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZkFns

protected ZkFns()
Method Detail

redraw

public static final void redraw(Component comp,
                                java.io.Writer out)
                         throws java.io.IOException
Redraw the specified component into the specified out.

Parameters:
comp - the component. If null, nothing happens
out - the output. If null, the current output will be used.
Throws:
java.io.IOException

outResponseJavaScripts

public static final java.lang.String outResponseJavaScripts(java.util.Collection responses)
Returns JavaScript for handling the specified response.


outLangJavaScripts

public static final java.lang.String outLangJavaScripts(java.lang.String action)
Returns HTML tags to include all JavaScript files and codes that are required when loading a ZUML page.

Note: it assumes Executions.getCurrent() is available.

FUTURE CONSIDERATION: we might generate the inclusion on demand instead of all at once.


outLangStyleSheets

public static final java.lang.String outLangStyleSheets()
Returns HTML tags to include all style sheets that are defined in all languages.

Note: it assumes Executions.getCurrent() is available.

In addition to style sheets defined in lang.xml and lang-addon.xml, it also include:

  1. The style sheet specified in the theme-uri parameter.

FUTURE CONSIDERATION: we might generate the inclusion on demand instead of all at once.


toAbsoluteURI

public static java.lang.String toAbsoluteURI(java.lang.String uri,
                                             boolean skipInclude)
Converts the specified URI to absolute if necessary. Refer to Execution.toAbsoluteURI(java.lang.String, boolean).

Parameters:
skipInclude - whether not to convert to an absolute URI if the current page is included by another page. When use the include directive, skipInclude shall be true.

toAbsoluteURI

public static java.lang.String toAbsoluteURI(java.lang.String uri)
Converts the specified URI to absolute if not included by another page. It is a shortcut of toAbsoluteURI(String, boolean) with skipInclude is true.


outPageHeaders

public static final java.lang.String outPageHeaders(Page page)
Returns HTML header elements of the specified page.


outLocaleJavaScript

public static final java.lang.String outLocaleJavaScript()
Generates Locale-dependent strings in JavaScript syntax.



Copyright © 2005-2007 Potix Corporation. All Rights Reserved.