ADF 双击 Table 跳转到另一个视图
来源:互联网 发布:知美术馆门票 编辑:程序博客网 时间:2024/06/01 10:01
双击table中的某行,然后跳转到该行的查看视图。
分别在页面 Table组件中加入 客户端监听和服务监听,加入JS代码,调用BackingBean,执行跳转。
ADF Table 中需要的属性:
页面中Table组件,加粗部分为需要添加的代码。
<af:table value="#{bindings.UserTableView1.collectionModel}"
var="row"
rows="#{bindings.UserTableView1.rangeSize}"
filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.UserTableView1.collectionModel.selectedRow}"
selectionListener="#{bindings.UserTableView1.collectionModel.makeCurrent}"
rowSelection="single" id="t1"
partialTriggers="::cb3"
binding="#{backingBeanScope.staffManageBean.t1}"
styleClass="AFStretchWidth" >
<af:clientListener method="handleTableDoubleClick" type="dblClick"/>
<af:serverListener type="TableDoubleClickEvent" method="#{backingBeanScope.staffManageBean.handleTableDoubleClick}"/>
<af:column sortProperty="#{bindings.UserTableView1.hints.StaffNo.name}"
filterable="true" sortable="false"
headerText="#{bindings.UserTableView1.hints.StaffNo.label}"
id="c5">
<af:outputText value="#{row.StaffNo}" id="ot5"/>
</af:column>
....
form组件中加如下JS:
<af:resource type="javascript" >function handleTableDoubleClick(evt){ var table = evt.getSource();AdfCustomEvent.queue(table, "TableDoubleClickEvent",{}, true);evt.cancel();}</af:resource>
backingBean中的代码:
public void handleTableDoubleClick(ClientEvent ce){ navToOutCome("toView");//跳转到taskFlow中的 “toView”页面 //刷新Psl1为页面第一个组件,上级为改页面Jsff,即刷新Jsff AdfFacesContext.getCurrentInstance().addPartialTarget(this.getPsl1().getParent());}//跳转方法public void navToOutCome(String outCome) { FacesContext facesContext = FacesContext.getCurrentInstance(); Application application = facesContext.getApplication(); NavigationHandler navigationHandler = application.getNavigationHandler(); ControllerContext controllerContext = ControllerContext.getInstance(); String viewId = controllerContext.getCurrentViewPort().getViewId(); if (viewId != null) { navigationHandler.handleNavigation(facesContext, viewId, outCome); } }
- ADF 双击 Table 跳转到另一个视图
- 跳转到另一个页面
- 导出ADF Table内容到Excel
- 导出ADF Table内容到Excel
- action跳转到另一个action
- mvc 跳转到另一个controler
- MFC 资源视图 对话框中控件 无法添加变量 或者双击左键之后没法跳转到对应函数
- 模态视图跳转到根视图
- 页面定时自动跳转到另一个页面
- 点击radio跳转到另一个页面
- 从一个action跳转到另一个action
- 从一个Activity跳转到另一个Activity
- 5秒后跳转到另一个页面
- 从一个app跳转到另一个app
- 从一个页面跳转到另一个页面
- SpringMVC从Controller跳转到另一个Controller
- 从一个应用程序跳转到另一个应用程序
- SpringMVC从Controller跳转到另一个Controller
- Using rt2x00 wireless driver with hostapd
- 谈谈ASP.NET中母版与主题的一点点认识
- 图解SQL的inner join、left join、right join、full outer join、union、union all的区别
- How does Zend View use view helpers?
- 运行时多态和编译时多态
- ADF 双击 Table 跳转到另一个视图
- asp.net mvc源码分析-ModelValidatorProviders
- swig扩展php(二)
- iPhone开发:设置UITableView的一些样式
- Cocos2d-x初入学堂(16)-->C++通过JNI和Java的数据相互
- Ubuntu 环境变量及ADB配置
- 将特殊字符创分开后存入表中
- 技术的真谛
- 散列查找 哈希表 Hash