|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.fn.DspFns
public class DspFns
Utilities to generate ZK related information in DSP pages.
For JSP pages, use JspFns
instead.
For ZUML pages, use ZkFns
instead.
Constructor Summary | |
---|---|
DspFns()
|
Method Summary | |
---|---|
static java.lang.String |
outDeviceCSSContent(java.lang.String deviceType)
Generates the complete CSS content of all components in the specified device. |
static java.lang.String |
outDeviceJavaScripts(java.lang.String deviceType)
Returns HTML tags to include JavaScript files of the specified device for the current application (never null). |
static java.lang.String |
outDeviceStyleSheets(java.lang.String deviceType)
Returns HTML tags to include style sheets of the specified device for the current application (never null). |
static java.lang.String |
outZkHtmlTags(java.lang.String deviceType)
Generates and returns the ZK specific HTML tags such as stylesheet and JavaScript. |
static void |
setCacheControl(java.lang.String prop,
int hours)
Sets the Cache-Control and Expires headers for the response. |
static void |
setCSSCacheControl()
Sets the Cache-Control and Expires headers for the CSS files of class Web resources. |
static void |
setCWRCacheControl()
Sets the Cache-Control and Expires headers for class Web resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DspFns()
Method Detail |
---|
public static java.lang.String outZkHtmlTags(java.lang.String deviceType)
deviceType
- the device type. If null, ajax is assumed.
public static java.lang.String outDeviceCSSContent(java.lang.String deviceType)
Notice that it generates the content, while
outDeviceStyleSheets(java.lang.String)
generates the HTML tag that
will include the content.
public static final java.lang.String outDeviceStyleSheets(java.lang.String deviceType)
This method is used for DSP pages.
deviceType
- the device type. If null, ajax is assumed.public static final java.lang.String outDeviceJavaScripts(java.lang.String deviceType)
public static void setCacheControl(java.lang.String prop, int hours)
prop
- the name of the property to check if the headers
shall be generated. If null, it is always generated.
If "false" is specified with this property, this method won't
generate anything. In other words, "false" means to disable the cache.
If It is used for debugging/developing purpose.hours
- the number of hours the client is allowed to cache the
resourcepublic static void setCSSCacheControl()
It first check if org.zkoss.web.classWebResource.cache is turned off, and then check how many hours specified in org.zkoss.web.classWebResource.cache.CSS.hours. If it is turned off or the value of hours is non-positive, nothing is generated Otherwise, it generates the header with the specified hours (default: 8760).
setCWRCacheControl()
public static void setCWRCacheControl()
Notice that, for the CSS files, please use setCSSCacheControl()
instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |