cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with PresentationVariant for OData V2 CAP Service in Fiori Elements and with SmartTable

gregorw
Active Contributor
0 Kudos
596

Hello SAPUI5 Smart Elements Team,

in my CAP sample project bookshop-demo I've added the following annotation to the Books entity:

annotate my.Books with @(UI : {
    PresentationVariant : {
        $Type     : 'UI.PresentationVariantType',
        MaxItems  : 10,
        SortOrder : [{
            $Type      : 'Common.SortOrderType',
            Property   : price,
            Descending : true
        }]
    },

This annotation works fine for my Fiori Elements Application using the OData V2 Endpoint http://localhost:4004/v2/catalog. When I start the Application:

http://localhost:4004/webapp/fiori-latest.html?sap-language=en#Books-displayUI5latest

and start the search I get this result:

The only small issue there is that there is no indication that the list is ordered descending by Price. This indicator only appears if I set the sorting manually:

But the bigger issue occurs when using the Books entity in combination with a SmartTable. I already use the tableType "Table" as I found in the UI5 documentation for PresentationVariant that "SortOrder is not evaluated for the ResponsiveTable control.". When I now start http://localhost:4004/webapp/fiori-latest.html?sap-language=en#Books-displayUI5latestFreestyleApp I see this result:

On the positive side you recognise the sorting indicator. But unfortunately the values are not sorted correctly.

And as soon as a custom column is added to the table the sorting indicator disappears completely. Also the sorting is not executed (Sample also in http://localhost:4004/webapp/fiori-latest.html?sap-language=en#Books-displayUI5latestFreestyleApp):

Right now I'm using SAPUI5 1.100.2. But it would be great if also 1.96 can be fixed.

CU
Gregor

:

maissa93
Participant
0 Kudos

Hello Gregor,

the following SAP ticket has been opened:

  • Sort Indicator missing in Fiori Elements with ticket ID: 300420 / 2022
  • SmartTable shows sort indicator but content is not sorted, ticket ID: 300438 / 2022
  • Sorting defined in PresentationVariant is not applied in a SmartTable with custom column, ticket ID: 300516 / 2022

I will keep you posted if any solution occurs.

gregorw
Active Contributor

Hi maissa.ben.mahouachi ,

can you provide also the Ticket numbers instead of the ID? I think that will be easier to find by SAP employees.

Thanks.

CU
Gregor

Accepted Solutions (0)

Answers (0)