LiteBean的使用

LiteBean声明以后,就可以被使用了。使用方式有两种:

1) 直接在页面中通过EL表达式使用LiteBean

<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:w="http://www.apusic.com/jsf/widget">
<w:page title="pageTitle">
  <w:textField width="100" value="#35{myBean.someValue}"></w:textField>
</w:page>
</f:view>

2) 基于 IoVC使用LiteBean。

请参考示例

我们并不排斥上述两种用法中的示意一种,但我们建议您使用IoVC这种新的编程模式,请参考 Inversion of View-Control

[上一页] [下一页]