Difference between revisions of "ZK Book Cheatsheet"

From Documentation
m (Created page with '=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 wor…')
 
 
(8 intermediate revisions by one other user not shown)
Line 4: Line 4:
 
=ZK Book best practices=
 
=ZK Book best practices=
  
==Images: ==
+
==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 _
 
*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.
 
**For example ZK Calendar Essential has an image of a simple application. The filename is ZKCalEss_Simple_calendar_application.png.
  
==Headings: ==
+
==Headings ==
 
*On a book page the maximum size of heading should be 3, for example ===my heading===
 
*On a book page the maximum size of heading should be 3, for example ===my heading===
 
**'''UNLESS''' stated otherwise in a conversion guide.
 
**'''UNLESS''' stated otherwise in a conversion guide.
*Every word in a heading should be capitalized except for joining words such as “and” and “with”.
+
*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=
 
=Custom ZK Tags=
  
 
{| border='1px'
 
{| border='1px'
! javadoc !! tag which creates links to our javadoc from the wiki !! Should be used for ALL class names !! package.path.of.the.Javadoc !! directory
+
! Tag !! Description !! When should I use it? !! Tag Content !! Attributes !! Notes !! Example(s)
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. !! org.zkoss.zul.Window
+
| javadoc
org.calendar.Calendars  
+
| 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.
 +
| <nowiki><javadoc>org.zkoss.zul.Window</javadoc></nowiki>
 +
<nowiki><javadoc directory="calendar">org.calendar.Calendars</javadoc></nowiki>
 +
<nowiki><javadoc directory="jsdoc">zul.wnd.Window</javadoc></nowiki>
 +
<nowiki><javadoc type="interface">org.zkoss.image.Image</javadoc></nowiki>
 
|-
 
|-
 
| imagelink
 
| imagelink
Line 32: Line 49:
 
The URI of the image
 
The URI of the image
 
The text to display with the link  
 
The text to display with the link  
|  
+
| <nowiki><imagelink link="http://www.zkoss.org" image="http://www.zkoss.org/zk.png" text="ZK Link" /></nowiki>
 
|-
 
|-
 
| mp
 
| mp
Line 40: Line 57:
 
| NONE
 
| NONE
 
| NONE
 
| NONE
| setItem(Object o)
+
| <nowiki><mp>setItem(Object o)</mp></nowiki>
 
|-
 
|-
 
| source
 
| source
Line 48: Line 65:
 
| lang
 
| lang
 
| The lang you will use: zul -> xml, java -> java, javascript->js
 
| The lang you will use: zul -> xml, java -> java, javascript->js
| public void hello {}
+
| <nowiki><source lang="java">public void hello {}</source></nowiki>
 
|-
 
|-
 
|}
 
|}

Latest revision as of 06:34, 3 January 2011

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>