nc65用友uap开发列表多选和boolean类型的单选框在浏览态可以选择

来源:互联网 发布:php get 请求数据加密 编辑:程序博客网 时间:2024/05/19 21:19
nc65用友uap开发列表多选和boolean类型的单选框在浏览态可以选择
1.对于列表中的左侧单选框显示并在浏览态可以选择

要达到以上效果 
在xml配置文件里面做如下操作:
<property name="multiSelectionMode" value="1" />   配置关键代码
<!--====== 视图元素:[PUBAPP列表视图控件(ShowUpableBillListView)实例对象] ============== --><bean id="billListView" class="nc.ui.pubapp.uif2app.view.ShowUpableBillListView"init-method="initUI"><property name="model"><ref bean="bmModel" /></property><property name="multiSelectionMode" value="1" /><property name="templateContainer" ref="templateContainer" /></bean>

2.在列表中直接可以选中多行如下图所示

在xml文件中配置如下:
关键代码
<property name="multiSelectionEnable" value="true" />
<!--====== 视图元素:[PUBAPP列表视图控件(ShowUpableBillListView)实例对象] ============== --><bean id="billListView" class="nc.ui.pubapp.uif2app.view.ShowUpableBillListView"init-method="initUI"><property name="model"><ref bean="bmModel" /></property><property name="multiSelectionEnable" value="true" /><property name="templateContainer" ref="templateContainer" /></bean>
3.在列表boolean类型中单选框浏览态中可以直接选择:

<!--====== 视图元素:[PUBAPP列表视图控件(ShowUpableBillListView)实例对象] ==============--><bean id="billListView" class="nc.ui.fdc_pr.h303202005.ace.view.ShowUpableBillListViewMy" init-method="initUI"><property name="model"><ref bean="bmModel" /></property><property name="nodekey" value="bt" /><property name="multiSelectionEnable" value="false" /><property name="templateContainer" ref="templateContainer"/></bean>
package nc.ui.fdc_pr.h303202005.ace.view;import nc.ui.pub.bill.BillItem;import nc.ui.pubapp.uif2app.view.ShowUpableBillListView;/** *  * @author: zenglong * @ClassName: ShowUpableBillListViewMy  * @Description: 重写列表初始编辑状态 * @date: 2016年12月5日 */public class ShowUpableBillListViewMy extends ShowUpableBillListView {private static final long serialVersionUID = 1L;@Overridepublic void initUI() {// TODO 自动生成的方法存根super.initUI();getBillListPanel().getHeadBillModel().setEnabled(true);BillItem[] bodyItems = getBillListPanel().getHeadBillModel().getBodyItems();for (BillItem item : bodyItems) {if(!"define_gather".equalsIgnoreCase(item.getKey())){item.setEnabled(false);}}}}



0 0
原创粉丝点击