Welcome 微信登录

首页 / 数据库 / MySQL / Oracle ADF 双击行事件

参考ADF Code Corner How-to handle and respond to mouse double clicks in ADF Faces tables.在双击table 的某一行时 ,实现弹出popup,popup中弹出子table的数据.在主table的属性结尾加上<af:clientListener method="handleTableDoubleClick" type="dblClick"/> <af:serverListener type="TableDoubleClickEvent" method="#{empbean.handleTableDoubleClick}"/>
clientListener 捕获客户端双击行这个事件,并传递给js 的handleTableDoubleClick方法;在页面af:document下 写handleTableDoubleClick事件<af:resource type="javascript">
function handleTableDoubleClick(evt){ var table = evt.getSource();
AdfCustomEvent.queue(table, "TableDoubleClickEvent",{}, true);
evt.cancel();
}
</af:resource>
ManageBean的代码:方法控制服务端弹出popuppublic void handleTableDoubleClick(ClientEvent ce){
RichPopup popup = this.getGetpopup(); //popup是一个RichPopup型对象,绑定服务端组件popup
//no hints means that popup is launched in the
//center of the page
RichPopup.PopupHints ph = new RichPopup.PopupHints();
popup.show(ph);}
PS:还有双击table的某一行时实现弹出popup,弹出是搜索帮助情况,以后研究.刚做个列字段为1到12个月.则双击某1列时实现传入当列的月份.则需要commandlink,与双击行无关.Oracle 使用分析函数实现小计合计Oracle ADF 一个页面实现 维护区域Form和查看区域Table 方法相关资讯      Oracle基础教程 
  • Oracle块编程返回结果集详解  (11/10/2013 10:45:58)
  • Oracle基础教程之设置系统全局区  (08/22/2013 14:24:00)
  • Oracle基础教程知识点总结  (06/18/2013 07:43:32)
  • Oracle基础教程之tkprof程序详解  (10/22/2013 11:49:50)
  • Oracle基础教程之sqlplus汉字乱码  (07/18/2013 16:30:00)
  • Oracle 管理之 Linux 网络基础  (02/16/2013 18:37:35)
本文评论 查看全部评论 (0)
表情: 姓名: 字数