Patient.gender.coding
Note on equality: This class uses the {@link Include#setValue(String) value} as the single item used to provide {@link #hashCode()} and {@link #equals(Object)}.
Include a servlet's output (result of servlet or a JSP page).
Note: Any additional params supplied to the included page are not accessible within the rendered page through the <s:property...> tag since no valuestack will be created. You can, however, access them in a servlet via the HttpServletRequest object or from a JSP page via a scriptlet.
<-- One: --> <s:include value="myJsp.jsp" /> <-- Two: --> <s:include value="myJsp.jsp"> <s:param name="param1" value="value2" /> <s:param name="param2" value="value2" /> </s:include> <-- Three: --> <s:include value="myJsp.jsp"> <s:param name="param1">value1</s:param> <s:param name="param2">value2</s:param> </s:include> Example one - do an include myJsp.jsp page Example two - do an include to myJsp.jsp page with parameters param1=value1 and param2=value2 Example three - do an include to myJsp.jsp page with parameters param1=value1 and param2=value2
The following example shows how to integrate a header and footer, coming from a plain HTML source on the same server is integrated using this component. The files footer.html and header.html would be located in the web application root directory
Java:
... add(new Include("header", "header.html")); add(new Include("footer", "footer.html")); ...Html:
... <div> <div wicket:id="header">header comes here</div> <div>I am the body!</div> <div wicket:id="footer">footer comes here</div> </div> ...@author Eelco Hillenius
e.g.include('myFile.php'), include_once($myFile), require($myClass->getFileName()), require_once(A::FILE_NAME)
Non-XUL extension.
If this component is the only child of its parent, the default width and height will become 100%.
Since 3.6.2, there are three modes: auto (default), instant and defer. The behavior prior to 3.6.2 is the same as the defer mode. The default mode is auto
since 5.0. However, you can change it to defer
by specifying a library property named org.zkoss.zul.include.mode
(for fully backward compatibility).
In the instant mode, the page to be included are loaded 'instantly' with {@link Execution#createComponents} when {@link #afterCompose}is called. Furthermore, the components are created as the child components of this include component (like a macro component).
Notices:
In the defer mode (the only mode supported by ZK prior to 3.6.2), the page is included by servlet container (the include
method of javax.servlet.RequestDispatcher
) in the render phase (i.e., after all components are created). The page can be any servlet; not limited to a ZUML page.
If it is eventually another ZUML page, a ZK page ( {@link org.zkoss.zk.ui.Page}) is created and added to the current desktop. You can access them only via inter-page API (see {@link org.zkoss.zk.ui.Path}).
In the auto mode, the include component decides the mode based on the name specified in the src property ( {@link #setSrc}). If src
is ended with the extension named .zul
or .zhtml
, the instant
mode is assumed. Otherwise, the defer
mode is assumed. Notice that if a query string is specified, the defer
mode is assumed, too.
Notice that invoking {@link #setProgressing} or {@link #setLocalized}with true will imply the defer
mode (if the mode is auto
).
There are two ways to pass parameters to the included page:
First, since ZK 3.0.4, you can use {@link #setDynamicProperty}, or, in ZUL,
<include src="/WEB-INF/mypage" arg="something"/>
Second, you can use the query string:
<include src="/WEB-INF/mypage?arg=something"/>
With the query string, you can pass only the String values. and the parameter can be accessed by {@link Execution#getParameter}or javax.servlet.ServletRequest's getParameter. Or, you can access it with the param variable in EL expressions.
On the other hand, the dynamic properties ( {@link #setDynamicProperty}) are passed to the included page thru the request's attributes You can pass any type of objects you want. In the included page, you can access them by use of {@link Execution#getAttribute} or javax.servlet.ServletRequest'sgetAttribute. Or, you can access with the requestScope variable in EL expressions.
In additions to macro and {@link Include}, you can use the fulfill attribute as follows: <div fulfill="=/my/foo.zul">...</div>
@author tomyeh
@see Iframe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|