zoukankan      html  css  js  c++  java
  • 页面记载给绑定query的grid加filter

    功能名称:listDataAction

    切入类型:before

    事件名称:com.kingdee.bos.webframework.dynamic.event.view.WebListDataEvent;

     1 package com.kingdee.eas.re.sales.costmarkout.handler;
     2 
     3 import org.apache.commons.lang3.StringUtils;
     4 import org.springframework.ui.ModelMap;
     5 import com.kingdee.bos.metadata.query.util.CompareType;
     6 import com.kingdee.bos.ui.face.UIRuleUtil;
     7 import com.kingdee.bos.webframework.dynamic.event.view.IWebListDataEventHandler;
     8 import com.kingdee.bos.webframework.dynamic.event.view.WebListDataEvent;
     9 import com.kingdee.bos.webframework.dynamic.handler.view.WebListDataEventHandler;
    10 import com.kingdee.bos.webframework.exception.WafException;
    11 
    12 import com.kingdee.eas.fdc.sales.MoneyTypeEnum;
    13 
    14 
    15 public class ListDataFilterEventHandler implements IWebListDataEventHandler {
    16     public static final String DATAGRID_ENTITYVIEW = "DataGridEntityView";
    17     public void onRequest(WebListDataEvent event) throws WafException,BOSException {
    18         // TODO Auto-generated method stub
    19         ModelMap modelMap = event.getReqeustContext().get(ModelMap.class);
    20         HttpServletRequest request = event.getReqeustContext().getHttpServletRequest();        
    21         EntityViewInfo entityViewInfo = (EntityViewInfo) modelMap.get(DATAGRID_ENTITYVIEW);
    22         SellProjectInfo sellInfo = SalesContext.getSellProject();
    23         if (entityViewInfo == null) {
    24             entityViewInfo = new EntityViewInfo();
    25         }
    26         if(sellInfo!=null){
    27             FilterInfo filterInfo = getFilter(request);
    28             //FilterInfo filterInfo = new FilterInfo();
    29             filterInfo.getFilterItems().add(new FilterItemInfo("sellProject.id",sellInfo.getId().toString(),CompareType.EQUALS));
    32             if(FilterUtility.hasFilterItem(entityViewInfo.getFilter())) {
    33                 entityViewInfo.getFilter().mergeFilter(filterInfo,"and");
    34             }else {
    35                 entityViewInfo.setFilter(filterInfo);
    36             }
    37         }
    38         modelMap.put(DATAGRID_ENTITYVIEW, entityViewInfo);
    39     }
  • 相关阅读:
    对图像边缘进行随机均匀采样的C#算法实现
    [淡藤]最近几年在Chinapub上买的书
    重新认识C#: 玩转指针
    又是一年春来到
    需求定律在起着作用
    haha, 愚人节听鱼人歌
    名字就叫奥格工作室!
    effective c++ 第六章
    com 名字对象(1)IBindCtx
    com 名字对象(2)创建名字对象(IMoniker)
  • 原文地址:https://www.cnblogs.com/suruozhong/p/6005672.html
Copyright © 2011-2022 走看看