2017-04-25 19 views
0

私はテーブルのヘッダーにボタンを含むテーブルを作成しようとしています。私はhereからの案内です。ツールバーコンポーネント内のコンテンツ要素が機能しません

これは私のコードです:

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" 
     xmlns="sap.m" 
     xmlns:l="sap.ui.layout" 
     xmlns:f="sap.ui.layout.form" 
     xmlns:t="sap.ui.table" 
     height="100%" 
     controllerName="xxxxx" 
     xmlns:html="http://www.w3.org/1999/xhtml"> 
    <Page title="CONFIGURACIÓN DE LA CUENTA" navButtonPress="onCancel" showNavButton="true"> 

     <content> 
      <f:SimpleForm id="form_requerimiento_datos_generales" minWidth="1024" 
          maxContainerCols="2" editable="true" layout="ResponsiveGridLayout" 
          labelSpanL="4" labelSpanM="4" 
          emptySpanL="0" emptySpanM="0" columnsL="2" columnsM="2" 
          validateFieldGroup="onValidateFieldGroup"> 
       <f:content> 


        <core:Title text="Suscripciones"/> 
        <t:Table 
         rows="{/Subscriptions?$filter=UserSystem eq '1'}" 
         selectionMode="None" 
         visibleRowCount="7"> 
         <t:toolbar> 
          <content> 
           <Title id="title" text="Listado de Suscripciones" /> 
           <ToolbarSpacer/>       
           <Button 
            icon="sap-icon://add" 
            tooltip="Agregar Suscripciones" 
            press="addSuscription"/> 
          </content> 
         </t:toolbar> 
         <t:columns> 
          <!--columns--> 
         </t:columns> 
        </t:Table>  
       </f:content> 
      </f:SimpleForm> 
     </content> 
    </Page> 
</core:View> 

私は、エラーメッセージ、次のいる:

Uncaught Error: failed to load 'sap/m/content.js' from https://sapui5.netweaver.ondemand.com/resources/sap/m/content.js: 0 - NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.netweaver.ondemand.com/resources/sap/m/content.js'. 

を、私はこのエラーを取得する理由を私は知りません。 コンテンツラベルは、ツールバーのラベル(例では、この作品)の内側に受け入れられなかった理由を私は知らない

<t:toolbar> 
    <content> 
     <Title id="title" text="Listado de Suscripciones" /> 
     <ToolbarSpacer/>       
     <Button 
      icon="sap-icon://add" 
      tooltip="Agregar Suscripciones" 
      press="addSuscription"/> 
    </content> 
</t:toolbar> 

:私は、それは、コードのこの部分でだと思います。私は自分のページの内容ラベルを外すとき。私はエラーメッセージを受け取っていません。

私は自分の問題を解決するために何をしているのか知りたいと思います。

助けてくれてありがとう!

UPDATE 1

私はすでに私の問題を解決しましたが、今私は別の問題を抱えています。

enter image description here

+1

置き、テーブルとチェックの前にツールバー。 – santhosh

答えて

1

ラベル<t:toolbar>が集約名であり、それはその中にツールバーを期待:私は、テーブルヘッダのCSSの問題を(これは、テーブル本体と重なっている)を持っています。 したがって、理想的には<t:toolbar>の後にsap.m.Toolbarコントロールが続きます。

なぜ投げているのですか:sap/m/contentエラーは、<t:toolbar>の後にコントロールが必要なためです。また、デフォルトネームスペースはsap.mなので、デフォルトのネームスペースでコントロールを探します(この場合はコンテンツを指定しています)。sap.m.contentというようなコントロールはありません。したがって、エラーです。

あなたのガイドソースをチェックした場合、あなたは彼らが持っているでしょう。ここ<m:Toolbar><toolbar>後の集約

が更新されたコードです:

     <t:toolbar> 
          <Toolbar> 
           <content> 
            <Title id="title" text="Listado de Suscripciones" /> 
            <ToolbarSpacer/>       
            <Button 
             icon="sap-icon://add" 
             tooltip="Agregar Suscripciones" 
             press="addSuscription"/> 
           </content> 
          </Toolbar> 
         </t:toolbar> 
+0

助けてくれてありがとう。今、私はテーブルヘッダーのCSSに別の問題があります –

関連する問題