使用UIComponent.getId()区分按钮操作
来源:互联网 发布:盒子助手软件 编辑:程序博客网 时间:2024/03/29 15:31
环境:ADF, JSF
在开发中,经常会使用自定义的Popup和Dialog,Dialog中的按钮通常也不是默认的。不同的按钮会有不同的操作,可以使用下面的代码,简单方便进行不同操作的区分:
<af:popup > <af:dialog title="Confirm Change" type="none" > <f:verbatim>Would you like to save the change?</f:verbatim> <f:facet name="buttonBar"> <af:panelGroupLayout layout="horizontal" halign="center"> <af:commandButton text="Yes" id="yes" actionListener="#{sharedPopup.handleDialog}" partialSubmit="true"/> <af:commandButton text="No" id="no" actionListener="#{sharedPopup.handleDialog}" partialSubmit="true"/> </af:panelGroupLayout> </f:facet> </af:dialog></af:popup>......public void handleDialog(ActionEvent event) { UIComponent source = (UIComponent)event.getSource(); if (source.getId().equals("no")) { xxx xxxx } else { xxx xxxx } RichPopup popup = getPopup(); // popup binding popup.hide();}
- 使用UIComponent.getId()区分按钮操作
- UIComponent
- viewHolder,setTag,getTag,setId,getId的使用
- $q异步操作使用按钮
- UIComponent研究
- $ids = implode(",",$getid);
- 按钮操作
- 两个SUBMIT按钮,如何区分处理
- android 按钮两次点击事件区分
- UITableViewCell上添加按钮区分点击方法
- iOS中按钮根据tag来区分
- LifeCycle of UIcomponent
- Using the UIComponent class
- Observations on UIComponent Drawing
- UIComponent之life cycle
- UIComponent Shape Graphics
- Adobe Flex UIComponent LifeCycle
- UIComponent.document是Application
- 对指针的一般认识
- POJ 1205
- Drawable的用法
- 2011 Multi-University Training Contest 1 - Cat VS Dog
- android中创建设备节点
- 使用UIComponent.getId()区分按钮操作
- IT人的级别
- 首次内核编译出错,更改路径的方法
- Javascript脚本自动登录B/S系统
- Hadoop的安装---在真实的linux集群上安装
- 正方形贴图
- javascript
- vs2010中MessageBox的用法
- 敏捷测试理论以及实践 - 7(全文完)