| org.zkoss.web.servlet.dsp.action.ActionContext
All known Subclasses: org.zkoss.web.servlet.dsp.impl.ActionContextImpl,
ActionContext | public interface ActionContext (Code) | | Encapsulates a portion of DSP page in an object that can be invoked
as many times as needed.
author: tomyeh |
Method Summary | |
public String | encodeURL(String uri) Encodes the specified URI.
In additions, if uri starts with "/", the context path, e.g., /we2,
is prefixed.
In other words, "/ab/cd" means it is relevant to the servlet
context path (say, "/we2").
If uri starts with "~abc/", it means it is relevant to a foreign
context called /abc. | public Object | findAttribute(String name) | public Object | getAttribute(String name, int scope) Returns the attribute of the specified scope. | public int | getLineNumber() Returns the line number of this action. | public Writer | getOut() Returns the current output. | public Action | getParent() Returns the parent action, or null if no parent at all. | public void | include(String uri, Map params) Includes the specified URI and render the result to the specified
output.
Parameters: uri - the URI to include. | public void | removeAttribute(String name, int scope) Removes the attribute of the specified scope. | public void | renderFragment(Writer out) Renders the nested fragment.
Parameters: out - the output. | public void | setAttribute(String name, Object value, int scope) Sets the attribute of the specified scope. | public void | setContentType(String ctype) Sets the content type. |
APPLICATION_SCOPE | final public static int APPLICATION_SCOPE(Code) | | The application scope.
|
PAGE_SCOPE | final public static int PAGE_SCOPE(Code) | | The page scope.
|
REQUEST_SCOPE | final public static int REQUEST_SCOPE(Code) | | The request scope.
|
SESSION_SCOPE | final public static int SESSION_SCOPE(Code) | | The session scope.
|
encodeURL | public String encodeURL(String uri) throws ServletException(Code) | | Encodes the specified URI.
In additions, if uri starts with "/", the context path, e.g., /we2,
is prefixed.
In other words, "/ab/cd" means it is relevant to the servlet
context path (say, "/we2").
If uri starts with "~abc/", it means it is relevant to a foreign
context called /abc. And, it will be converted to "/abc/" first
(without prefix request.getContextPath()).
Finally, the uri is encoded by HttpServletResponse.encodeURL.
|
findAttribute | public Object findAttribute(String name)(Code) | | Finds the attribute from page, request, session to application scope
|
getLineNumber | public int getLineNumber()(Code) | | Returns the line number of this action.
It is used for throwing exception and debug purpose.
|
getParent | public Action getParent()(Code) | | Returns the parent action, or null if no parent at all.
|
include | public void include(String uri, Map params) throws ServletException, IOException(Code) | | Includes the specified URI and render the result to the specified
output.
Parameters: uri - the URI to include. It is OK to relevant (without leading'/'). If starts with "/", the context path of request is assumed.To reference to foreign context, use "~ctx/" where ctx is thecontext path of the foreign context (without leading '/'). Parameters: params - a map of parameters, or null to ignore.The map is passed thru the request attribute called arg. |
setContentType | public void setContentType(String ctype)(Code) | | Sets the content type.
|
|
|