ZK Book Cheatsheet

From Documentation
Revision as of 06:34, 3 January 2011 by Tomyeh (talk | contribs) (moved How Tos/How to Use ZK's Book Wiki to ZK Book Cheatsheet)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Wiki formatting

For wiki formatting please take a look at http://en.wikipedia.org/wiki/Wikipedia:Cheatsheet

ZK Book best practices

Images

  • Use the book name each word shortened to 3 characters as a prefix. Then follow it with _ and the name of the file where spaces are also replaced with _
    • For example in ZK Component Reference you should use ZKComRef_[component name]_[created filename].png
    • For example ZK Calendar Essential has an image of a simple application. The filename is ZKCalEss_Simple_calendar_application.png.

Headings

  • On a book page the maximum size of heading should be 3, for example ===my heading===
    • UNLESS stated otherwise in a conversion guide.
  • Every word in a heading should be capitalized except for joining words such as:
    • and
    • with
    • to
    • for
    • an
    • UNLESS the word is the FIRST word of a title

Custom ZK Tags

Tag Description When should I use it? Tag Content Attributes Notes Example(s)
javadoc tag which creates links to our javadoc from the wiki Should be used for ALL class names package.path.of.the.Javadoc directory

type

Give it the type of javadoc, currently available types are: calendar (ZK Calendar), jsdoc (JavaScript doc), zk (default). ZK there is no need to specify it. It is used as default.

Enables to switch between classes and interfaces, each has their own look. Default is class.

<javadoc>org.zkoss.zul.Window</javadoc>

<javadoc directory="calendar">org.calendar.Calendars</javadoc> <javadoc directory="jsdoc">zul.wnd.Window</javadoc> <javadoc type="interface">org.zkoss.image.Image</javadoc>

imagelink Create an image and text hyperlink Whenever you need to insert an image which is a link NONE link

image text

The resource URL

The URI of the image The text to display with the link

<imagelink link="http://www.zkoss.org" image="http://www.zkoss.org/zk.png" text="ZK Link" />
mp A class which currently maps to tags Should be used for ALL function names The desired function NONE NONE <mp>setItem(Object o)</mp>
source A class which can highlight source code When you want to place source code into a wiki page The source code lang The lang you will use: zul -> xml, java -> java, javascript->js <source lang="java">public void hello {}</source>