?? execution.java
字號:
* @param uri the URI of the page file. * * @see #getPageDefinitionDirectly(String, String) * @see #getPageDefinitionDirectly(Document, String) * @see #getPageDefinitionDirectly(Reader, String) */ public PageDefinition getPageDefinition(String uri); /** Converts the specified page content to a page definition. * * <p>Implemetation Notes: this method must invoke * {@link org.zkoss.zk.ui.sys.UiFactory#getPageDefinitionDirectly(org.zkoss.zk.ui.sys.RequestInfo, String, String)} * * @param content the raw content of the page. It must be in ZUML. * @param extension the default extension if the content doesn't specify * an language. In other words, if * the content doesn't specify an language, {@link LanguageDefinition#getByExtension} * is called. * If extension is null and the content doesn't specify a language, * the language called "xul/html" is assumed. * @see #getPageDefinitionDirectly(Document, String) * @see #getPageDefinitionDirectly(Reader, String) * @see #getPageDefinition */ public PageDefinition getPageDefinitionDirectly(String content, String extension); /** Converts the specified page content, in DOM, to a page definition. * * @param content the raw content of the page in DOM. * @param extension the default extension if the content doesn't specify * an language. In other words, if * the content doesn't specify an language, {@link LanguageDefinition#getByExtension} * is called. * If extension is null and the content doesn't specify a language, * the language called "xul/html" is assumed. * @see #getPageDefinitionDirectly(String, String) * @see #getPageDefinitionDirectly(Reader, String) * @see #getPageDefinition */ public PageDefinition getPageDefinitionDirectly(Document content, String extension); /** Reads the raw content from a reader and converts it into * a page definition. * * @param reader used to input the raw content of the page. It must be in ZUML. * @param extension the default extension if the content doesn't specify * an language. In other words, if * the content doesn't specify an language, {@link LanguageDefinition#getByExtension} * is called. * If extension is null and the content doesn't specify a language, * the language called "xul/html" is assumed. * @see #getPageDefinitionDirectly(String, String) * @see #getPageDefinitionDirectly(Document, String) * @see #getPageDefinition */ public PageDefinition getPageDefinitionDirectly(Reader reader, String extension) throws IOException; /** Creates components from the specified page definition. * * @param pagedef the page definition to use. It cannot be null. * @param parent the parent component, or null if you want it to be * a root component. If parent is null, the page is assumed to be * the current page, which is determined by the execution context. * @param arg a map of parameters that is accessible by the arg variable * in EL, or by {@link Execution#getArg}. * Ignored if null. * @return the first component being created. * @see #createComponents(String, Component, Map) */ public Component createComponents(PageDefinition pagedef, Component parent, Map arg); /** Creates components from a page file specified by an URI. * * <p>It loads the page definition from the specified URI (by * use {@link #getPageDefinition} ), and then * invokes {@link #createComponents(PageDefinition,Component,Map)} * to create components. * * @param parent the parent component, or null if you want it to be * a root component. If parent is null, the page is assumed to be * the current page, which is determined by the execution context. * @param arg a map of parameters that is accessible by the arg variable * in EL, or by {@link Execution#getArg}. * Ignored if null. * @see #createComponents(PageDefinition, Component, Map) * @see #createComponentsDirectly(String, String, Component, Map) * @see #createComponentsDirectly(Document, String, Component, Map) * @see #createComponentsDirectly(Reader, String, Component, Map) */ public Component createComponents(String uri, Component parent, Map arg); /** Creates components from the raw content specified by a string. * * <p>The raw content is parsed to a page defintion by use of * {@link #getPageDefinitionDirectly(String, String)}, and then * invokes {@link #createComponents(PageDefinition,Component,Map)} * to create components. * * @param content the raw content of the page. It must be in ZUML. * @param extension the default extension if the content doesn't specify * an language. In other words, if * the content doesn't specify an language, {@link LanguageDefinition#getByExtension} * is called. * If extension is null and the content doesn't specify a language, * the language called "xul/html" is assumed. * @param parent the parent component, or null if you want it to be * a root component. If parent is null, the page is assumed to be * the current page, which is determined by the execution context. * @param arg a map of parameters that is accessible by the arg variable * in EL, or by {@link Execution#getArg}. * Ignored if null. * @see #createComponents(PageDefinition, Component, Map) * @see #createComponents(String, Component, Map) * @see #createComponentsDirectly(Document, String, Component, Map) * @see #createComponentsDirectly(Reader, String, Component, Map) */ public Component createComponentsDirectly(String content, String extension, Component parent, Map arg); /** Creates components from the raw content specified by a DOM tree. * * <p>The raw content is parsed to a page defintion by use of * {@link #getPageDefinitionDirectly(Document, String)}, and then * invokes {@link #createComponents(PageDefinition,Component,Map)} * to create components. * * @param content the raw content in DOM. * @param extension the default extension if the content doesn't specify * an language. In other words, if * the content doesn't specify an language, {@link LanguageDefinition#getByExtension} * is called. * If extension is null and the content doesn't specify a language, * the language called "xul/html" is assumed. * @param parent the parent component, or null if you want it to be * a root component. If parent is null, the page is assumed to be * the current page, which is determined by the execution context. * @param arg a map of parameters that is accessible by the arg variable * in EL, or by {@link Execution#getArg}. * Ignored if null. * @see #createComponents(PageDefinition, Component, Map) * @see #createComponents(String, Component, Map) * @see #createComponentsDirectly(Document, String, Component, Map) * @see #createComponentsDirectly(Reader, String, Component, Map) */ public Component createComponentsDirectly(Document content, String extension, Component parent, Map arg); /** Creates components from the raw content read from the specified reader. * * <p>The raw content is loaded and parsed to a page defintion by use of * {@link #getPageDefinitionDirectly(Reader,String)}, and then * invokes {@link #createComponents(PageDefinition,Component,Map)} * to create components. * * @param reader the reader to retrieve the raw content in ZUML. * @param extension the default extension if the content doesn't specify * an language. In other words, if * the content doesn't specify an language, {@link LanguageDefinition#getByExtension} * is called. * If extension is null and the content doesn't specify a language, * the language called "xul/html" is assumed. * @param parent the parent component, or null if you want it to be * a root component. If parent is null, the page is assumed to be * the current page, which is determined by the execution context. * @param arg a map of parameters that is accessible by the arg variable * in EL, or by {@link Execution#getArg}. * Ignored if null. * @see #createComponents(PageDefinition, Component, Map) * @see #createComponents(String, Component, Map) * @see #createComponentsDirectly(Document, String, Component, Map) * @see #createComponentsDirectly(String, String, Component, Map) */ public Component createComponentsDirectly(Reader reader, String extension, Component parent, Map arg) throws IOException; /** Sends a temporary redirect response to the client using the specified * redirect location URL. * * <p>It is the same as sendRedirect(url, null). * * <p>After calling this method, the caller shall end the processing * immediately (by returning). All pending requests and events will * be dropped. * * @param uri the URI to redirect to, or null to reload the same page */ public void sendRedirect(String uri); /** Sends a temporary redirect response to the client using the specified * redirect location URL and redirect to the specified browser window. * * <p>After calling this method, the caller shall end the processing * immediately (by returning). All pending requests and events will * be dropped. * * <p>Note: if you specify target other than null and "_self", it'll * fail if the browser prevent the server to popup a window. * * @param uri the URI to redirect to, or null to reload the same page * @param target the name of the browser window that send-redirect will * load the sepcified URI, or null if the current browser window * is used. */ public void sendRedirect(String uri, String target); /** Returns the parameters (aka., arg) if {@link #pushArg} is called recently, * or an empty map if not available. * * <p>The use of parameters is application dependent. * ZK only provides the way to store ({@link #pushArg} and to * restore {@link #popArg}. And, let the parameters being accessible in * EL by referring it as the arg variable. * * <p>Currently, {@link #createComponents(String,Component,Map)} * and similar methods use this mechanism to let caller customize a page * definition. * * <p>Notice that {@link #createComponents(String,Component,Map)} * pops arg after creating components, and before processing any event. * In other words, it is not aviable for event listener, including onCreate. * However, {@link org.zkoss.zk.ui.event.CreateEvent#getArg} preserves * the map for its event listeners. */ public Map getArg(); /** Pushes the parameters (aka., arg) that EL could refer it by the arg variable. * Remember to call {@link #popArg} in the finally clause. * @see #getArg */ public void pushArg(Map arg); /** Pops the parameters (aka., arg) that is pushed by {@link #pushArg}. * <p>It never throws an exception. * @see #getArg */ public void popArg(); /** Adds an asynchronous response ({@link AuResponse}) which will be * sent to client at the end of the execution. * * <p>If {@link AuResponse#getDepends} is not null, the response * depends on the returned componet. In other words, the response * is removed if the component is removed. * If it is null, the response is component-independent. * * @param key could be anything. The second invocation of this method * in the same execution with the same key will override the previous one. */ public void addAuResponse(String key, AuResponse resposne); /** Returns whether the client is a browser. */ public boolean isBrowser(); /** Returns whether the client is a robot (such as Web crawlers). * * <p>Because there are too many robots, it returns true if the user-agent * is not recognized. */ public boolean isRobot(); /** Returns whether the client is Internet Explorer. * If true, it also implies {@link #isExplorer7} is true. */ public boolean isExplorer(); /** Returns whether the client is Internet Explorer 7 or later. */ public boolean isExplorer7(); /** Returns whether the client is Gecko based, such as Mozilla, Firefox and Camino. */ public boolean isGecko(); /** Returns whether the client is Safari. */ public boolean isSafari(); /** Returns the native request, or null if not available. * * <p>The returned object depends on the Web container. * If it is based Java servlet container, an instance of * javax.servlet.ServletRequest is returned. */ public Object getNativeRequest(); /** Returns the native response, or null if not available. * * <p>The returned object depends on the Web container. * If it is based Java servlet container, an instance of * javax.servlet.ServletResponse is returned. */ public Object getNativeResponse(); /** Returns the value of the specified request attribute. */ public Object getAttribute(String name); /** Sets the value of the specified request attribute. */ public void setAttribute(String name, Object value); /** Removes the specified request attribute. */ public void removeAttribute(String name); /** Returns a map of request attributes associated with this session. */ public Map getAttributes();}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -