Skip to content

Commit

Permalink
Merge "[INTERNAL] Cleanup string based definitions of column headers …
Browse files Browse the repository at this point in the history
…of GridTable"
  • Loading branch information
simlin authored and Gerrit Code Review committed Jul 26, 2023
2 parents 03c672c + fd481b6 commit a1c4878
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 25 deletions.
Expand Up @@ -9278,10 +9278,18 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
const oModel = createModel("/sap/opu/odata/sap/FAR_CUSTOMER_LINE_ITEMS");
const sView = '\
<t:AnalyticalTable id="table" threshold="10" visibleRowCount="4">\
<t:AnalyticalColumn grouped="true" leadingProperty="CompanyCode" template="CompanyCode"/>\
<t:AnalyticalColumn grouped="false" leadingProperty="Customer" template="Customer"/>\
<t:AnalyticalColumn leadingProperty="AmountInCompanyCodeCurrency" summed="true"\
template="AmountInCompanyCodeCurrency"/>\
<t:AnalyticalColumn grouped="true" leadingProperty="CompanyCode">\
<Label text="CompanyCode"/>\
<t:template><Text wrapping="false" text="{CompanyCode}"/></t:template>\
</t:AnalyticalColumn>\
<t:AnalyticalColumn grouped="false" leadingProperty="Customer">\
<Label text="Customer"/>\
<t:template><Text wrapping="false" text="{Customer}"/></t:template>\
</t:AnalyticalColumn>\
<t:AnalyticalColumn summed="true" leadingProperty="AmountInCompanyCodeCurrency">\
<Label text="AmountInCompanyCodeCurrency"/>\
<t:template><Text wrapping="false" text="{AmountInCompanyCodeCurrency}"/></t:template>\
</t:AnalyticalColumn>\
</t:AnalyticalTable>';

return this.createView(assert, sView, oModel).then(() => {
Expand Down Expand Up @@ -9340,10 +9348,18 @@ ToProduct/ToSupplier/BusinessPartnerID\'}}">\
const oModel = createModel("/sap/opu/odata/sap/FAR_CUSTOMER_LINE_ITEMS");
const sView = '\
<t:AnalyticalTable id="table" threshold="10" visibleRowCount="4">\
<t:AnalyticalColumn grouped="true" leadingProperty="CompanyCode" template="CompanyCode"/>\
<t:AnalyticalColumn grouped="false" leadingProperty="Customer" template="Customer"/>\
<t:AnalyticalColumn leadingProperty="AmountInCompanyCodeCurrency" summed="true"\
template="AmountInCompanyCodeCurrency"/>\
<t:AnalyticalColumn grouped="true" leadingProperty="CompanyCode">\
<Label text="CompanyCode"/>\
<t:template><Text wrapping="false" text="{CompanyCode}"/></t:template>\
</t:AnalyticalColumn>\
<t:AnalyticalColumn grouped="false" leadingProperty="Customer">\
<Label text="Customer"/>\
<t:template><Text wrapping="false" text="{Customer}"/></t:template>\
</t:AnalyticalColumn>\
<t:AnalyticalColumn summed="true" leadingProperty="AmountInCompanyCodeCurrency">\
<Label text="AmountInCompanyCodeCurrency"/>\
<t:template><Text wrapping="false" text="{AmountInCompanyCodeCurrency}"/></t:template>\
</t:AnalyticalColumn>\
</t:AnalyticalTable>';

return this.createView(assert, sView, oModel).then(() => {
Expand Down
Expand Up @@ -8,6 +8,7 @@ sap.ui.define([
"sap/ui/table/AnalyticalTable",
"sap/ui/table/AnalyticalColumn",
"sap/m/Label",
"sap/m/Title",
"sap/m/Button",
"sap/ui/model/json/JSONModel",
"sap/base/Log",
Expand All @@ -21,6 +22,7 @@ sap.ui.define([
AnalyticalTable,
AnalyticalColumn,
Label,
Title,
Button,
JSONModel,
Log,
Expand All @@ -40,7 +42,9 @@ sap.ui.define([

function _createTable(oModel) {
var oTable = new Table({
title: "Table Example",
extension: [
new Title({text: "Example Table"})
],
visibleRowCount: 5,
width: "200px",
rows: "{/}"
Expand Down Expand Up @@ -156,7 +160,9 @@ sap.ui.define([
var done = assert.async();

this.oTable = new AnalyticalTable({
title: "Table Example",
extension: [
new Title({text: "Example Table"})
],
visibleRowCount: 5,
width: "200px"
});
Expand Down
Expand Up @@ -104,37 +104,37 @@
>
<t:columns>
<t:Column id="rulesColumn"
label="Rules ({/selectedRulesCount} selected)"
sortProperty="name"
filterProperty="name">
<m:Label text="Rules ({/selectedRulesCount} selected)"/>
<t:template>
<m:Text text="{ruleSets>name}" wrapping="false"/>
</t:template>
</t:Column>
<t:Column id="categoriesColumn"
label="Categories"
width="10rem"
sortProperty="categories"
filterProperty="categories">
<m:Label text="Categories"/>
<t:template>
<m:Text text="{ruleSets>categories}" wrapping="false"/>
</t:template>
</t:Column>
<t:Column id="audienceColumn"
label="Audience"
visible="false"
sortProperty="audiences"
filterProperty="audiences">
<m:Label text="Audience"/>
<t:template>
<m:Text text="{ruleSets>audiences}" wrapping="false"/>
</t:template>
</t:Column>
<t:Column id="idsColumn"
label="RuleID"
width="10rem"
visible="false"
sortProperty="id"
filterProperty="id">
<m:Label text="RuleID"/>
<t:template>
<m:Text text="{ruleSets>id}" wrapping="false"/>
</t:template>
Expand Down
Expand Up @@ -127,7 +127,8 @@
rowHeight="24"
visibleRowCountMode="Auto">
<t:columns>
<t:Column label="Issues" resizable="false">
<t:Column resizable="false">
<Label text="Issues"/>
<t:template>
<FormattedText htmlText="{formattedName}"/>
</t:template>
Expand Down Expand Up @@ -173,17 +174,17 @@
<t:Column
sortProperty="context/id"
filterProperty="context/id"
label="Control Id"
resizable="false">
<Label text="Control Id"/>
<t:template>
<Text text="{context/id}" wrapping="false" tooltip="{context/id}"></Text>
</t:template>
</t:Column>
<t:Column
sortProperty="context/className"
filterProperty="context/className"
label="Class name"
resizable="false">
<Label text="Class name"/>
<t:template>
<Text text="{context/className}" wrapping="false" tooltip="{context/className}"></Text>
</t:template>
Expand Down
Expand Up @@ -24,25 +24,29 @@

<columns>

<Column label="Description">
<Column>
<m:Label text="Description"/>
<template>
<m:Text text="{Description}" wrapping="false" />
</template>
</Column>

<Column label="HierarchyLevel">
<Column>
<m:Label text="HierarchyLevel"/>
<template>
<m:Text text="{HierarchyLevel}" wrapping="false" />
</template>
</Column>

<Column label="NodeID">
<Column>
<m:Label text="NodeID"/>
<template>
<m:Text text="{NodeID}" wrapping="false" />
</template>
</Column>

<Column label="ParentNodeID">
<Column>
<m:Label text="ParentNodeID"/>
<template>
<m:Text text="{ParentNodeID}" wrapping="false" />
</template>
Expand Down
Expand Up @@ -17,25 +17,29 @@

<columns>

<Column label="Description">
<Column>
<m:Label text="Description"/>
<template>
<m:Text text="{Description}" wrapping="false" />
</template>
</Column>

<Column label="HierarchyLevel">
<Column>
<m:Label text="HierarchyLevel"/>
<template>
<m:Text text="{HierarchyLevel}" wrapping="false" />
</template>
</Column>

<Column label="NodeID">
<Column>
<m:Label text="NodeID"/>
<template>
<m:Text text="{NodeID}" wrapping="false" />
</template>
</Column>

<Column label="ParentNodeID">
<Column>
<m:Label text="ParentNodeID"/>
<template>
<m:Text text="{ParentNodeID}" wrapping="false" />
</template>
Expand Down

0 comments on commit a1c4878

Please sign in to comment.