zk 宏组件使用

1.宏组件一定放在WebContent下macors文件下如:
ltextbox.zul
<hbox>
<textbox id="txt_value" ></textbox><label id="lbl" value="*" style="color:red"></label>
</hbox>

2.页面调用宏组件
<?component name="macorsname" macroURI="/macors/ltextbox.zul"?>
使用:
<macorsname id="txt"/>

3.后台如何使用:
Page page = Executions.getCurrent().getDesktop().getPage("page_test");
Component com = page.getFellow("win_test").getFellow("txt");
Textbox txt= (Textbox)com.getFellow("txt_value");
Label lbl = (Label)com.getFellow("lbl");
在后面就不用说了吧,哈哈学学

你可能感兴趣的:(zk)