2017-05-09 7 views
0

現在SAPUI5に基づくWebアプリケーションを作成しています。現時点ではHTMLページに基づいていますが、動的な構造に移行する必要があります。ソリューションはルータになります。私は、チュートリアルのトン(実際に)続く(JS/XMLビュー)異なる構造を試みたが、ルータはオールウェイズルーターが表示されない

The target intro has a control id or a parent but no 'controlAggregation' was set, so the target could not be displayed. - EventProvider sap.m.routing.Target 

を返すこれが私の現在のルータのセットアップできました:

"routing": { 
      "config": { 
       "routerClass": "sap.m.routing.Router", 
       "viewType": "XML", 
       "viewPath": "xx.xxxxxxx.view", 
       "controlId": "appContainer" 
      }, 
      "routes": [ 
       { 
        "pattern": "", 
        "name": "intro", 
        "target": "intro" 
       } 
      ], 
      "targets": { 
       "intro": { 
        "viewName": "intro" 
       } 
      } 
     } 

controlId私のrootviewAppタグを指してください。

非常に単純なビュー(テキストのみのような)で試しましたが、問題は解決しません。

<mvc:View 
     controllerName = "xx.xxxxxxx.controller.app" 
     xmlns="sap.m" 
     xmlns:mvc="sap.ui.core.mvc" 
     displayBlock="true"> 
     <App id="appContainer"/> 
    </mvc:View> 

答えて

0

エラーメッセージが示すように、ルータは「イントロ」ビューを追加する必要があるアグリゲーションを認識していません。コントロールアプリケーションには「pages」(NavContainerから継承)という名前の集計があるため、"routing"/"config"には"controlAggregation": "pages"を含めます。

関連する問題