GenericForwardComposer
来源:互联网 发布:逆战透视源码 编辑:程序博客网 时间:2024/06/04 01:28
参考API:
https://www.zkoss.org/javadoc/latest/zk/
Demo:
A skeletal composer that you can extend and write intuitive onXxx$myid event handler methods with auto event forwarding and "auto-wired" accessible variable objects such as embedded objects, components, and external resolvable variables in a ZK zuml page; this class will add forward condition to the myid source component and forward source onXxx event received by the source myid component to the target onXxx$myid event (as defined in this composer) of the supervised target component; of course it will also registers onXxx$myid events to the supervised component and wire all accessible variable objects to this composer by calling setXxx() method or set xxx field value directly per the variable name. MyComposer.java public class MyComposer extends GenericForwardComposer { private Textbox mytextbox; private Window self; //embedded object, the supervised window "mywin" private Page page; //the ZK zuml page private Label mylabel; public void onChange$mytextbox(Event event) { mylabel.setValue("You just entered: "+ mytextbox.getValue()); } } test.zul <window id="mywin" apply="MyComposer"> <textbox id="mytextbox"/> <label id="mylabel"/> </window>
主要方法:
doAfterCompose(T comp)Auto forward events and wire accessible variables of the specified component into a controller Java object; a subclass that override this method should remember to call super.doAfterCompose(comp) or it will not work.
阅读全文
0 0
- GenericForwardComposer
- ZK 前端框架GenericForwardComposer和SelectorComposer的区别
- ZK(7.0.1)中SelectorComposer与GenericForwardComposer用法差异的简单示例
- 四种高效数据库设计思想——提高查询效率
- ListView 中的 setSelection()
- html5入门学习
- 如何配置Maven环境,创建工厂,新建Maven项目
- JVM中的内存分配及GC回收过程简单整理
- GenericForwardComposer
- 用R建立集成学习模型(boosting、bagging、stacking)
- I2C驱动情景分析——怎样控制I2C时序
- LCD显示的一些基本概念以及DSI的一些clock解释
- js常用函数和语法笔记
- 使用ViewModel共享页面内的数据:ActivityDataBus
- 10、XPath 学习记录——XPath操作HTML
- Android 高仿IOS打开和关闭按钮
- BZOJ1529 ska Piggy banks [并查集]