Felix Machus Felix Machus - 1 year ago 155
CSS Question

Implementation of the method .setStyleClass in detail View sapui5

Is there a possibility to adjust my table design with the method .setStyleClass?
And where and how do I implement this method ? Below a part of my detail view :


<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="{i18n>detailLineItemTableIDColumn}"/>

<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="{i18n>detailLineItemTableUnitNumberColumn}"/>


<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="{i18n>detailLineItemTableUoMColumn}"/>

<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="{i18n>detailLineItemTableDate}"/>

number="{path: 'Gesme' , formatter: '.formatter.numberUnit',formatOptions: {showMeasure: false}}" unit="{Meins}" state="Error"/>
text="{path: 'Bdatu', formatter: '.formatter.formatDate'}"/>

I want to adjust the font size of the column names. Feel free to suggest smarter ideas than mine.

Answer Source

you are using XML views and in order to add custom style sheets in XML view you don't need to use addStyleClass but just add class attribute to the element that you want to add style to.

Let's assume that you have a button you need to add style in the following way:

<Button class="myStyleClass"></Button>

and myStyleClass needs to be exist in your css file:

.myStyleClass {
  background-color: yellow;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download