- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
<h:outputLabel id="remainingDays" value="#{bean.DueDate}" title="#{bean.remainingDays}" >
<p:ajax listener="#{bean.listenerMethid}" update="remainingDays,remainingDays" process="remainingDays" event="mouseover"></p:ajax>
</h:outputLabel>
<p:tooltip for="remainingDays" id="tooltip" />
public void listenerMethod(AjaxBehaviorEvent event){
}
如何在listenerMethod()内使用AjaxBehaviorEvent获取Duedate
最佳答案
这应该作为通过 AjaxBehaviorEvent 获取值的通用方法:
public void listenerMethod(AjaxBehaviorEvent event) {
String dueDate = (String) ((UIOutput)event.getSource()).getValue();
}
但是,在您的情况下,您可以通过变量(或getter)访问它,因为它与listenerMethod位于同一个bean中。
关于ajax - 如何使用 AjaxBehaviorEvent 获取 selectedDate?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13890684/
我的 XHTML 是这样的 案例一:ajax监听方法AjaxBehaviorE
当我使用 从 Composite Component 发送 ajax 事件时 |我使用 在 Facelet 页面 中捕获它.在 backing bean 中,我捕获类型为 AjaxBehavior
public void listenerMethod(AjaxBehaviorEvent event){ } 如何在listenerMethod()内使用AjaxBehaviorEvent获取
最近我一直在尝试将我正在开发的这个应用程序从 JSF 1.2 升级到 JSF 2,但在此过程中我遇到了瓶颈,因为您可能已经知道 AjaxBehaviorEvent 对 JSF 来说是全新的,并且回到
我有一个 JSF ajax keyup 事件链接到支持 bean 中的事件监听器。 JSF文件中的代码如下。 backing bean 中的代码如下。 public void chang
我想知道是否有办法直接使用 jquery ajax 服务器请求来触发 jsf 托管 bean 方法(带有 AjaxBehaviorEvent 类型参数:与使用 f:ajax 时触发的相同)。顺便说一句
我是一名优秀的程序员,十分优秀!