zk框架 官方文档翻译2
来源:互联网 发布:java项目打包成war 编辑:程序博客网 时间:2024/06/15 08:01
- UI Controller
To control the UI, firstly, you need to implement a controller class which inherits ZK'sSelectorComposer[1] for a ZUL. Then, you can retrieve the UI component's Java object by annotating @Wire on controller's member variables. After this has been done, you can then control and manipulate UI by accessing those annotated member variables.
为了控制UI,首先,你必须在zul页面中去实现一个继承zk SelectorComposer[1]的控制器的接口。其次,你可以通过在成员变量上添加注解@Wire来获得组件的java对象。这一步完成以后,你就可以通过这些注解的变量来控制并且处理UI。
package foo; // some import statements are omitted for brevity.
public class RegistrationComposer extends SelectorComposer<Component> {
@Wire
private Button submitButton;
@Wire
private Checkbox acceptTermBox;}
line 7,10 Variable names "submitButton" and "acceptTermBox" corresponds to components' id attributes which are specified at mentioned ZUL in the previous section.
第七行,第十行的变量 "submitButton" 和"acceptTermBox" 响应了上一区域提到的组件id属性制定的组件。
We can then use the controller above to control our UI components by specifying attribute "apply" in the ZUL.
我们可以通过使用上面的控制器通过明确zul页面中的属性“apply”去控制我们的UI组件。
<window border="normal" width="400px" title="Welcome! New User"apply="foo.RegistrationComposer">
<!-- omit other components for brevity -->
</window>
- zk框架 官方文档翻译2
- zk框架 官方文档翻译1
- django 1.8 官方文档翻译:14-6 系统检查框架
- Python3.2官方文档翻译--文件读写
- Python3.2官方文档翻译--异常处理
- Python3.2官方文档翻译--清理动作
- Python3.2官方文档翻译--继承
- Python3.2官方文档翻译--迭代器
- Python3.2官方文档翻译--输出格式化
- Python3.2官方文档翻译--模板
- Swift语言官方文档翻译(2)
- Drools6.2官方文档,尝试翻译
- 【翻译】Xibo官方文档2-CMS Installation
- JNI官方文档翻译2-Getting Started
- JNI 官方文档翻译
- FullCalendar 官方文档翻译
- monkeyrunner官方文档翻译
- FullCalendar 官方文档翻译
- poj 1830
- 关于使用richedit5.0引起的超链接失效的问题
- ZOJ-1406
- __VA_ARGS__相关【转】
- webview的使用
- zk框架 官方文档翻译2
- 黑马程序员 第22天 异常
- SSH相关操作
- 编译器和解释器
- ubuntu在线系统升级方法
- 马虎的算式
- 湘潭大学四月月赛C题A+B(扩展欧几里得定理)
- html标签在浏览器居中显示
- Windows学习心得【子窗口】