zoukankan      html  css  js  c++  java
  • SAP C4C HTML Mashup initializePane方法里的Inport和Navigation处理

    在Cloud Application Studio里创建的HTML mashup,保存到C4C后台后,其元数据再被读取到前端消费,格式如下:


    我在C4C UI上指定的Mashup参数,URL的值如下:

    成功解析出input为Lead_Info_In:


    没有按照我期望的情形进行执行:


    MashupHTMLContainer.prototype.initializePane = function() {
    		var oController = this.getController();
    		var oModel = oController.getComponentModel();
    		var oEmbeddingcontext = oController.getEmbeddingContext();
    		this._oHtmlPage.setController(oController);
    		if (oModel) {
    			this._createMashupModel(oModel._oData, oEmbeddingcontext);
    			// checks if mashup has an inport or not
    			if (this._sInport) {
    				// creates inport adapter and attaches it to inport events
    				this._oInportAdapter = new InportAdapter(this._sInport, oController, true);
    				this._oInportAdapter.on("inportFired", $.proxy(this._onInPortFired, this));
    
    				if (!this._oMashupModel.hasHtmlCode()) {
    					// inport and source uri --> fire inport to build complete source uri
    					this._oInportAdapter.refire();
    					if (this._sInport === "ExtensionFieldsInPort") {
    						this._getSourceUriFromModel(this._oMashupModel);
    					}
    				}
    			} else {
    				// no inport and no html content --> source uri already valid
    				if (!this._oMashupModel.hasHtmlCode()) {
    					this._getSourceUriFromModel(this._oMashupModel);
    				}
    			}
    		}
    	};
    

    没有执行这个refire:

    解析出来的aTargets为空:

    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    android 访问SD卡的方法
    android 用Achartengine 作图
    hello
    IIS 7.0 "确认文件是否存在"功能
    test
    收藏:如何在Web页面上直接打开、编辑、创建Office文档
    JavaScript面向对象技术
    正则表达式30分钟入门教程
    JWT有状态登陆与无状态登陆
    20条JavaScript代码简洁的写法
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/12530201.html
Copyright © 2011-2022 走看看