-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1、把 Java 的原始碼放置於另一個檔案內,然後讓 zul 檔把它引入。
2、zul 檔可以使用已經編譯好的 Java 類別檔(即 .class 檔)。
如 何 做 是 否 有 范 例 。
my.zul
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<window id="main" onCreate="MyManager.init(main)"
onOK="MyManager.process(main)" onCancel="MyManager.cancel(main)" >
<button label="OK" onClick="MyManager.save(main)"/>
<button label="Cancel" onClick="MyManager.cancel(main)"/>
</window>
MyManager.java
package cx.mymanager;
import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Window;
public class MyManager {
public static void init(Window main) {
main.setTitle("关注我的请求!");
}
public static void save(Window main) throws InterruptedException {
main.setTitle("save......");
Messagebox.show("您的信息已经保存!");
}
public static void cancel(Window main) throws InterruptedException {
main.setTitle("cancel......");
Messagebox.show("你取消的请求已经完成!");
}
}
点 击 ok 按钮 无法 调 用 MyManager.java
Asked: 2012-09-30 17:39:15 +0800
Seen: 206 times
Last updated: Oct 06 '12
ZK studio and eclipse outline problem
ZK Package configuration problem
Eclipse Autocomplete not working in ZUL files...
Syntax Error mark ... help me!
Manual Installation of ZK Studio
Can't see button text whilst running simple demo
Adding Vbox to Center layout in Java