question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No `class` / `style` property for `sap.m.Table` in the API reference

See original GitHub issue

In UI5 there are several pre-defined density / margins modes.

According to the API reference, in the list of sap.m.Table methods, there is a reference to addStyleClass / removeStyleClass, but no any mention of class / style properties which can be used in an XML-template:

<Table class = "sapUiSizeCompact" />

Is it an API reference bug?

OpenUI5 1.97.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
codeworriorcommented, Nov 16, 2021

See above. It’s not wrong. It’s just not a feature of sap.m.Table (where you expected to find it), but of XMLView (which fails to document it). And XMLView supports it for each control, including sap.m.Table.

It is, however, wrong to write the following in JS code

  new Table({
    class : "sapUiSizeCompact"
  });

That’s why class is not listed as a property in the API reference of any of the controls. There are only very few places in UI5 where it makes a difference whether you use XML notation or JavaScript APIs. class is one of them, binding another one.

0reactions
pubmikebcommented, Nov 22, 2021

Since, it is not an issue and a detail description is provided from our side, I am closing the incident!

@niyap, it’s actually the issue, please, have a look to the @codeworrior’s quote:

Both attributes should be mentioned somewhere around https://openui5nightly.hana.ondemand.com/topic/91f292806f4d1014b6dd926db0e91070 or https://sapui5.hana.ondemand.com/#/topic/5ee3be4727864bb08b991414e0428e38 .

«…but of XMLView (which fails to document it)»

From the comment above, I may infer that a change is still needed to be applied on documentation of

@codeworrior, please, correct me if I got it wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sap.m.Table - API Reference - Demo Kit - SAPUI5 SDK
Description: Enables alternating table row colors. Note: This property can only be used with the Belize and Belize Deep themes. Alternate row coloring ......
Read more >
Table Personalization - SAP Help Portal
TablePersoController; A table personalization persistence service provider, based on abstract class sap.m.TablePersoProvider. Table Personalization Dialog.
Read more >
JsDoc Report - API Reference - sap.m.Table
Creates a new subclass of class sap.m.Table with name sClassName and enriches it with the information contained in oClassInfo . sap.m.Table.getMetadata ...
Read more >
Smart Table | SAP Fiori Design Guidelines
The property placeToolbarInTable adds the toolbar to the corresponding aggregation of the inner SAPUI5 table. In most cases, set this to “true”, ...
Read more >
SAP UI development Toolkit for HTML5 - API Reference - sap.m
FeedListItemThe control provides a set of properties for text, ... List or sap.m.Table . ListHeaderDesignDefines the different header styles.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found