org.zkoss.zkplus.liferay
Class NonRootContextJQueryRenderPatch
java.lang.Object
org.zkoss.zkplus.liferay.JQueryRenderPatch
org.zkoss.zkplus.liferay.NonRootContextJQueryRenderPatch
- All Implemented Interfaces:
- PageRenderPatch
public class NonRootContextJQueryRenderPatch
- extends JQueryRenderPatch
Used to patch the rendering result of a ZK portlet for Liferay.
When using ZK portlets with Liferay under non root context, we have
to add a JSESSIONID under root(/) path.
To use it, you have to specify a library property called
""org.zkoss.zk.portlet.PageRenderPatch.class" with this class's name
("org.zkoss.zkplus.liferay.NonRootContextJQueryRenderPatch").
- Since:
- 5.0.11
- Author:
- jimmy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NonRootContextJQueryRenderPatch
public NonRootContextJQueryRenderPatch()
beforeRender
public java.io.Writer beforeRender(RequestInfo reqInfo)
- Description copied from class:
JQueryRenderPatch
- It returns an instance of StringWriter if
JQueryRenderPatch.getDelay()
is non-negative,
or null if negative (means no patch).
- Specified by:
beforeRender
in interface PageRenderPatch
- Overrides:
beforeRender
in class JQueryRenderPatch
- Parameters:
reqInfo
- the request information
- Returns:
- null if no need of patch, or a writer if the patch is required.
The writer will be used to hold the rendering result of the portlet.
Thus, you can process it later in
PageRenderPatch.patchRender(org.zkoss.zk.ui.sys.RequestInfo, org.zkoss.zk.ui.Page, java.io.Writer, java.io.Writer)
(so the writer
is usually an instance of StringWriter).
patchRender
public void patchRender(RequestInfo reqInfo,
Page page,
java.io.Writer result,
java.io.Writer out)
throws java.io.IOException
- Description copied from interface:
PageRenderPatch
- Called after rendering to patch the result.
If
PageRenderPatch.beforeRender(org.zkoss.zk.ui.sys.RequestInfo)
returns null, this method won't be called
since nothing to patch.
If PageRenderPatch.beforeRender(org.zkoss.zk.ui.sys.RequestInfo)
returns a writer, the writer will become
the result argument.
- Specified by:
patchRender
in interface PageRenderPatch
- Overrides:
patchRender
in class JQueryRenderPatch
- Parameters:
reqInfo
- the request informationresult
- the result returned by PageRenderPatch.beforeRender(org.zkoss.zk.ui.sys.RequestInfo)
, and
the rendering result of a page will be written to it.out
- the real output sent to the client. It is the writer
to write the patched result to.
- Throws:
java.io.IOException
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.