Html"

From Documentation
Line 64: Line 64:
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| 5.x.x
+
| 5.0.1
| x/x/20xx
+
| 4/27/2010
 
| Initialization
 
| Initialization
 
|}
 
|}
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Revision as of 11:13, 27 April 2010

HTML

  • Demonstration: N/A
  • Java API: Html
  • JavaScript API: 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

ZKComRef Html.png

 <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 <h4>...</p> will become the content of the html element (see also the getContent method of the org.zkoss.zul.Html class).

The html component generates the HTML SPAN tag 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

Name
Event Type
None None

Supported Children

*ALL

Use cases

Version Description Example Location
5.0+    

Version History

Version Date Content
5.0.1 4/27/2010 Initialization



Last Update : 2010/04/27

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.