2008年1月23日 星期三

ZK-比較好的編輯

剛開始研究zk~~ 使用eclipse~~
不過…這個界面和使用記事本編輯沒啥二樣~~~XD~~ 倒~~
就算有華麗的界面也會讓人卻步吧~~~

參考網頁 http://en.wikibooks.org/wiki/ZK/How-Tos#Eclipse
<就是它了>

How to setup the zul.xsd schema into Eclipse

  1. You should have setup Eclipse to work with ZK. The details is in the above smalltalk.
  2. Execute the Eclipse SDK.
  3. Select Window/Preferences... from the menu and the Preferences dialog popup.
  4. Select Web and XML/XML Catalog from the left sidebar tree menu and the right side is the XML Catalog panel.
  5. Select User Specified Entries in the XML Catalog Entries field and press the Add... button.
  6. The Add XML Catalog Entry dialog now popup:
  7. Now you should see a new entry http://www.zkoss.org/2005/zul/zul.xsd under the User Specified Entires.
  8. Done.

How to generate ZUL files from the ZUL schema using Eclipse

  1. You should have setup the zul.xsd schema into Eclipse.
  2. Select File/New/Other... from the Eclipse SDK menu and the New dialog popup.
  3. In Select a wizard page, select XML/XML from the tree menu and press Next > button.
  4. In Create XML File page, select Create XML file from an XML schema file and then press Next > button.
  5. In XML File Name page, type or select a proper parent folder for your project. It is generally under the WebContext folder of your project. Then type in the ZUL file name you want to create(e.g. helloworld.zul) and press Next > button.
  6. In Select XML Schema File page, select Select XML catalog entry option. You should see the http://www.zkoss.org/2005/zul/zul.xsd in the XML Catalog list. Now select the entry and press Next > button.
  7. In Select Root Element page:
    • In Root Element field, pick a proper root element. In most ZK applications, it is generally a window or an zk element.
    • In Content options field, you can leave as is.
    • In Namespace Information field, you can select the entry and press edit... button to take out the prefix or change the prefix.
    • Press Finish button.
  8. The ZUL file is created and opened on an XML editor window.
  9. Now you can start editing your ZUL file. Press Alt-/ to open the Content Assist popup window to help you fill up proper ZUL elements and attributes.
  10. Done.

沒有留言:

☆★☆★☆★☆ ~用手機記錄生活~~