zoukankan      html  css  js  c++  java
  • 页面加载后从后面带数据到前台

    功能名称:initializeAction

    切入类型:after

    事件名称:com.kingdee.bos.webframework.dynamic.handler.view.WebPageOnLoadEventHandler;

     1 package com.kingdee.eas.re.sales.costmarkout.handler;
     2 
     3 import java.util.HashMap;
     4 import java.util.Map;
     5 
     6 import org.springframework.ui.ModelMap;
     7 
     8 import com.kingdee.bos.eventbus.event.view.AbstractOnRequestEvent;
     9 import com.kingdee.bos.webframework.dynamic.application.WebSymbolConstant;
    10 import com.kingdee.bos.webframework.dynamic.handler.view.WebPageOnLoadEventHandler;
    11 import com.kingdee.bos.webframework.exception.WafException;
    12 import com.kingdee.bos.webframework.json.JSONUtils;
    13 import com.kingdee.eas.fdc.crm.basedata.SellProjectInfo;
    14 import com.kingdee.eas.re.sales.web.utils.SalesContext;
    15 
    16 public class WebPageOnloadDetailEventHandler extends WebPageOnLoadEventHandler {
    17     @Override
    18     public void onLoad(AbstractOnRequestEvent event) throws WafException {
    19         // TODO Auto-generated method stub
    20         ModelMap modelMap = event.getReqeustContext().get(ModelMap.class);
    21         SellProjectInfo sellInfo = SalesContext.getSellProject();
    22         Map initData = JSONUtils.convertJsonToObject((String) modelMap.get(WebSymbolConstant.PAGE_INITDATA_VAR));
    23         if (initData == null) {
    24             initData = new HashMap();
    25         }
    26         
    27         if(sellInfo!=null){
    28             initData.put("sellProjectId", sellInfo.getId().toString());
    29         }
    30         modelMap.put(WebSymbolConstant.PAGE_INITDATA_VAR,JSONUtils.convertObjectToJson(initData));
    31     }
    32 }

    前台js取值

    _self._pageInitData.sellProjectId

     
  • 相关阅读:
    mitm iptables ssltrip set ferret hamster
    SQL注入的常用函数和语句
    SQL注入的字符串连接函数
    SQL注入的分类
    DNS配置详解
    Linux的任务计划--cron入门
    Linux文件系统层次结构标准
    Linux的awk命令
    Linux的sed命令
    Linux的find命令
  • 原文地址:https://www.cnblogs.com/suruozhong/p/6005655.html
Copyright © 2011-2022 走看看