使用PF 3.0-RC1快照(11/22/2011)
我有一个复合组件.我想在进行选择时调用valueChangeListener,但它似乎没有调用监听器.
以下是组件的代码:
<p:selectOneMenu style="width: 220px;"
value="#{customerProfileSessionBean.selectedAccount}"
valueChangeListener="#{customerProfileSessionBean.accountValueChange}" >
<f:selectItems value="#{sessionBean1.custAccountList}"/>
</p:selectOneMenu>
Run Code Online (Sandbox Code Playgroud)
支持bean中的侦听器有一个未被调用的print语句(至少我没有在服务器日志中看到它).
还有什么我需要做的是在值改变时调用valueChangeListener吗?我需要使用吗?
另外,在监听器中,是否有传递的ValueChangeEvent?
谢谢.
我试图通过org.hamcrest.Matchers匹配Object的两个不同属性.这里是:
List<LeaveApply> leaveApplyList = Lambda.select(
allLeaveApplyList,
Matchers.allOf(
Lambda.having(
Lambda.on(LeaveApply.class).getUser().getId(),
Matchers.equalTo(userId)),
Lambda.having(
Lambda.on(LeaveApply.class).getDate(),
Matchers.allOf(
Matchers.greaterThanOrEqualTo(fromDate),
Matchers.lessThanOrEqualTo(toDate)))
)
);
Run Code Online (Sandbox Code Playgroud)
它给出一个LeaveApply对象列表,其中user-id等于给定的id和日期小于或等于to-date且大于或等于from-date.这是工作.我想知道它是匹配不同属性字段的正确方法吗?