我必须分析我公司的Report and Repair Malfunction fiori申请。
问题是关于使用CreateNotification.view.xml
控件的SmartForm
:
<!--
Copyright (C) 2009-2017 SAP SE or an SAP affiliate company. All rights reserved.
-->
<mvc:View controllerName="i2d.eam.malfunction.manages1.controller.CreateNotification" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:mvc="sap.ui.core.mvc" xmlns:semantic="sap.m.semantic" xmlns:smartField="sap.ui.comp.smartfield"
xmlns:smartForm="sap.ui.comp.smartform" xmlns="sap.m" xmlns:native="sap.ndc" xmlns:core="sap.ui.core" xmlns:layout="sap.ui.layout">
<semantic:FullscreenPage id="malfuncManagePageCreateNotification" floatingFooter="true">
<semantic:content>
<core:InvisibleText id="malfuncManageSmartFieldCreationTimeLabel" text="{/#C_MaintNotificationTPType/NotificationCreationTime/@sap:label}"/>
<!-- Create Malfunction Report form -->
<smartForm:SmartForm class="sapUiResponsiveMargin" editTogglable="false" editable="true" flexEnabled="true"
id="malfuncManageSmartFormCreate" title="{i18n>xtit.malfunctionReport}">
<smartForm:layout>
<smartForm:Layout emptySpanL="1" emptySpanM="0" labelSpanL="3" labelSpanM="3"/>
</smartForm:layout>
<smartForm:groups>
<smartForm:Group id="malfuncManageSmartFormCreateGroup">
<smartForm:GroupElement id="malfuncManageSmartFormCreateTechObjGroupElement">
<smartField:SmartField fieldGroupIds="TechnicalObject" id="malfuncManageSmartFieldTechObj" mandatory="true" showValueHelp="false"
value="{TechnicalObjectForEdit}" placeholder="{i18n>ymsg.technicalObjectPlaceholder}">
<smartField:layoutData>
<layout:GridData spanL="7" spanM="8" spanS="10"/>
</smartField:layoutData>
</smartField:SmartField>
<native:BarcodeScannerButton provideFallback="false" scanSuccess="onScanSuccess">
<native:layoutData>
<layout:GridData spanL="1" spanM="1" spanS="2"/>
</native:layoutData>
</native:BarcodeScannerButton>
<core:Fragment fragmentName="i2d.eam.malfunction.manages1.view.fragment.TechnicalObjectLinks" type="XML" objectBindings="{to_TechnicalObject}"
visible="{= ${viewProperties>/isValidTechnicalObject} === true && ${TechnicalObject} !== '' && ${TechObjIsEquipOrFuncnlLoc} !== '' }"></core:Fragment>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreateNotifTextGroupElement">
<smartField:SmartField fieldGroupIds="NotificationText" id="malfuncManageSmartFieldNotifText" mandatory="true" value="{NotificationText}"
placeholder="{i18n>ymsg.malfunctionReportDescriptionPlaceholder}"/>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreateNotifLongTextGroupElement">
<smartField:SmartField fieldGroupIds="NotificationLongText" id="malfuncManageSmartFieldNotifLongText"
value="{to_MaintNotifLongTextTP/MaintNotifLongTextForEdit}" width="100%" placeholder="{i18n>ymsg.malfunctionReportLongTextPlaceholder}"/>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreateNotifCodeGroupElement">
<smartField:SmartField id="malfuncManageSmartFieldMaintNotificationCode" visible="{= ${MaintNotificationCatalog} !== '' }"
fieldGroupIds="MaintNotificationCode" value="{MaintNotificationCode}">
<smartField:configuration>
<smartField:Configuration controlType="dropDownList" displayBehaviour="descriptionAndId"/>
</smartField:configuration>
</smartField:SmartField>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreateMalfuncEffectGroupElement">
<smartField:SmartField fieldGroupIds="MalfunctionEffect" value="{MalfunctionEffect}">
<smartField:configuration>
<smartField:Configuration controlType="dropDownList" displayBehaviour="descriptionAndId"/>
</smartField:configuration>
</smartField:SmartField>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreateLocDescGroupElement">
<smartField:SmartField fieldGroupIds="LocationDescription" value="{LocationDescription}"
placeholder="{i18n>ymsg.technicalObjectCurrentLocationPlaceholder}"/>
</smartForm:GroupElement>
<smartForm:GroupElement elementForLabel="0" id="malfuncManageSmartFormCreateNotifDateTimeGroupElement">
<smartField:SmartField textLabel="{/#C_MalfunctionreportType/NotificationDateTime/@sap:label}" fieldGroupIds="NotificationCreationDate"
id="malfuncManageSmartFieldCreationDate" value="{NotificationCreationDate}">
<smartField:layoutData>
<layout:GridData spanL="6" spanM="6" spanS="6"/>
</smartField:layoutData>
</smartField:SmartField>
<smartField:SmartField fieldGroupIds="NotificationCreationTime" id="malfuncManageSmartFieldCreationTime" value="{NotificationCreationTime}"
ariaLabelledBy="malfuncManageSmartFieldCreationTimeLabel">
<smartField:layoutData>
<layout:GridData spanL="2" spanM="3" spanS="6"/>
</smartField:layoutData>
</smartField:SmartField>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreateReportedByGroupElement">
<smartField:SmartField textLabel="{ReportedByUser/#@sap:label}" fieldGroupIds="ReportedByUser" id="malfuncManageSmartFieldReporter"
mandatory="true" value="{ReportedByUserAlias}">
<smartField:configuration>
<smartField:Configuration displayBehaviour="descriptionAndId"/>
</smartField:configuration>
</smartField:SmartField>
</smartForm:GroupElement>
<smartForm:GroupElement id="malfuncManageSmartFormCreatePersonResponsibleGroupElement">
<smartField:SmartField textLabel="{i18n>xfld.assignTo}" fieldGroupIds="PersonResponsible" id="malfuncManageSmartFieldPartner"
showValueHelp="true" value="{PersonResponsible}"/>
</smartForm:GroupElement>
</smartForm:Group>
</smartForm:groups>
</smartForm:SmartForm>
<!-- Attachment component -->
<core:ComponentContainer usage="attachmentReuseComponent" id="malfuncManageAttachSrvCompContCreate" class="sapUiResponsiveMargin"
propagateModel="true"/>
</semantic:content>
<!-- Footer -->
<semantic:messagesIndicator>
<semantic:MessagesIndicator enabled="true" press="onMessagesButtonPress"/>
</semantic:messagesIndicator>
<semantic:draftIndicator>
<DraftIndicator id="malfuncManageCreateDraftIndicator"></DraftIndicator>
</semantic:draftIndicator>
<semantic:saveAction>
<semantic:SaveAction id="malfuncManageSaveMalfunctionReport" enabled="true" formatError="" parseError="" press="onPressSave"
validationError="" validationSuccess="" visible="true"></semantic:SaveAction>
</semantic:saveAction>
<semantic:cancelAction>
<semantic:CancelAction enabled="true" formatError="" parseError="" press="onPressCancel" validationError="" validationSuccess=""
visible="true"></semantic:CancelAction>
</semantic:cancelAction>
</semantic:FullscreenPage>
</mvc:View>
结构中有一个注解.xml文件,我认为它确定了数据源。
SmartForm和注释如何相互连接?