I create a fragment with following content:
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core"
>
<f:SimpleForm
title="Address"
editable="true"
layout="ResponsiveGridLayout"
columnsM="2"
>
<Label text="Customer"></Label>
<Input>
<layoutData>
<l:GridData span="XL4 L4 M12 S12"/>
</layoutData>
</Input>
<Label text="PO reference">
<layoutData>
<l:GridData span="XL1 L1 M12 S12"/>
</layoutData>
</Label>
<Input>
<layoutData>
<l:GridData span="XL4 L4 M12 S12"/>
</layoutData>
</Input>
<Label text="PO date"></Label>
<Input>
<layoutData>
<l:GridData span="XL4 L4 M12 S12"/>
</layoutData>
</Input>
<Label text="Recipient">
<layoutData>
<l:GridData span="XL1 L1 M12 S12"/>
</layoutData>
</Label>
<Input>
<layoutData>
<l:GridData span="XL4 L4 M12 S12"/>
</layoutData>
</Input>
<Label text="Incoterms"></Label>
<Input>
<layoutData>
<l:GridData span="XL4 L4 M12 S12"/>
</layoutData>
</Input>
</f:SimpleForm>
<Table id="orderItemTable" inset="false">
<columns>
<Column>
<Text text="No."/>
</Column>
<Column
minScreenWidth="Desktop"
demandPopin="true"
hAlign="End"
>
<Text text="Customer"/>
</Column>
<Column
minScreenWidth="Desktop"
demandPopin="true"
hAlign="End"
>
<Text text="Sales Org."/>
</Column>
<Column
minScreenWidth="Desktop"
demandPopin="true"
hAlign="Center"
>
<Text text="Distribution"/>
</Column>
<Column hAlign="End">
<Text text="Division"/>
</Column>
</columns>
<ColumnListItem>
<cells></cells>
</ColumnListItem>
</Table>
</core:FragmentDefinition>
And the views file structure looks as following:
I read in the Wakthrough step about how to integrate a fragment in controller but I want to use fragment directly in the view. Is it possible?
Do you mean like this?
<core:Fragment fragmentName="mynamespace.view.ViewCreate" type="XML" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With