From Documentation

Jump to: navigation, search


<?link [href="uri"] [name0="value0"] [name1="value1"] [name2="value2"]
   [if="..."] [unless="..."]?>
[since 3.6.2]

It specifies an element that should be generated inside the HEAD element. It is generated after ZK default JavaScript and CSS files. Thus, it could override ZK default CSS. Currently only HTML-based clients (so-called browsers) support them. Furthermore, HTML LINK tag is actually generated for each of this declaration.

Developers can specify whatever attributes you like; it is up to the browser to interpret. ZK only encodes the URI of the href and src attribute (by the use of the encodeURL method of the Executions class). ZK generates all other attributes directly to the client.

Notice that these header directives are effective only for the main ZUL page. In other words, they are ignored if a page is included by another pages or servlets. Also, they are ignored if the page is a zhtml file.

<?link rel="alternate" type="application/rss+xml" title="RSS feed"
<?link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"?>
<?link  rel="stylesheet" type="text/css" href="~./zul/css/ext.css.dsp"?>

 <window title="My App">
     My content


In addition, you could use the style component to embed JavaScript code. The script component supports more features such as defer, but it has some memory foot print at the server (since it is a component).

Version History

Version Date Content

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