2017-04-25 4 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

난 이미 내 문제를 해결하지만 지금은 또 다른 문제가 있습니다. 나는 테이블 헤더의 CSS에 문제가 (이 표 본체와 겹쳐지는)이 있습니다

enter image description here

+1

장소 도구 모음 테이블 전에 확인이. – santhosh

답변

1

라벨 <t:toolbar>가 집계 이름을 그리고 그 안에 툴바를 기대하고있다. 이상적으로는 <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에 또 다른 문제가 있습니다. –