SAPUI5 Table Edit
SAPUI5 Table Edit
xml
<columns>
<Column width="12em">
<Text text="Product" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true"
hAlign="End">
<Text text="Quantity" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true"
hAlign="Center">
<Text text="Weight" />
</Column>
<Column hAlign="End">
<Text text="Price" /></Column></columns>
<cells>
<ObjectIdentifier title="{Name}"
text="{ProductId}" />
<ObjectNumber
number="{
path:'Quantity',
type: 'sap.ui.model.type.String',
formatOptions: {showMeasure: false}
}"
unit="{UoM}" />
<ObjectNumber number="{WeightMeasure}"
unit="{WeightUnit}"
state="{
path: 'WeightMeasure',
formatter:
'sap.m.sample.TableEditable.Formatter.weightState'
}" />
<ObjectNumber
number="{
parts:[{path:'Price'},{path:'CurrencyCode'}],
type: 'sap.ui.model.type.Currency',
formatOptions: {showMeasure: false}
}"
unit="{CurrencyCode}" />
</cells>
the format of the field will depend on the formatting options provided in the 'formatOptions'
property. Specifically, the 'showMeasure' property is set to false, which means the measurement
unit (i.e., 'quantity') will not be displayed along with the value in the user interface.
The display format for the field will depend on the formatting options that are provided in the
'formatOptions' property. In this case, the 'showMeasure' property is set to true, which means the
measurement unit (i.e., 'quantity') will be displayed along with the value in the user interface.
<OverflowToolbar id="otbFooter">
<Text text="SAP MDG: SAPUI5" textAlign="Center"></Text>
<ToolbarSpacer />
<Button text="Order" press="onOrder">
<Table id="idProductsTable" growing="true" growingThreshold="5" >