Html"
From Documentation
m (→Example) |
m (→Example) |
||
Line 24: | Line 24: | ||
</source> | </source> | ||
− | where <tt><h4>...</p></tt> will become the content of the <tt>html </tt>element (see also the <tt>getContent </tt>method of the <tt>org.zkoss.zul.Html </tt>class). | + | where <tt><h4>...</p></tt> will become the content of the <tt>html</tt>element (see also the <tt>getContent</tt>method of the <tt>org.zkoss.zul.Html</tt>class). |
− | The <tt>html </tt>component generates the HTML <tt>SPAN </tt>tag to enclose the content. In other words, it generates the following HTML tags when rendered to the browser. | + | The <tt>html </tt>component generates the HTML <tt>SPAN</tt>tag to enclose the content. In other words, it generates the following HTML tags when rendered to the browser. |
<source lang="xml" > | <source lang="xml" > |
Revision as of 10:55, 27 April 2010
HTML
Employment/Purpose
The simplest way is to use a XUL component called html to embed whatever HTML tags you want to send directly to the browser. To avoid ZK from interpreting the HTML tags, you usually enclose them with <![CDATA[ and ]]>. In other words, they are not the child component. Rather, they are stored in the content property. Notice you can use EL expressions in it.
Example
<window id="win" title="Html Demo">
<html><![CDATA[
<h4>Hi, ${win.title}</h4>
<p>It is the content of the html component.</p>
]]></html>
</window>
where
... will become the content of the htmlelement (see also the getContentmethod of the org.zkoss.zul.Htmlclass).
The html component generates the HTML SPANtag to enclose the content. In other words, it generates the following HTML tags when rendered to the browser.
<span id=”...”>
<h4>Hi, Html Demo</h4>
<p>It is the content of the html component.</p>
</span>
Supported events
None | None |
Supported Children
*ALL
Use cases
Version | Description | Example Location |
---|---|---|
5.0+ |
Version History
Version | Date | Content |
---|---|---|
5.x.x | x/x/20xx | Initialization |