Openui5: IconTabHeaderMode enum is empty in documentation

Created on 8 Apr 2018  路  19Comments  路  Source: SAP/openui5

Hello colleagues,

In the Web IDE I recently noticed a linter error for the headerMode property of the IconTabBar control: _The property value for enum type of property is incorrect. Please enter the correct value._

In my the XML I define the control as follows:
<IconTabBar id="idIconTabBar" select="handleIconTabBarSelect" headerMode="Inline">.

The following gives error as well:
headerMode="sap.m.IconTabHeaderMode.Inline".

If I go to the API of the enum (https://sapui5.hana.ondemand.com/#/api/sap.m.IconTabHeaderMode/overview), I see there's no values.

The control and Inline property however works fine.

Could you please fix this?

Thanks,
Ilya

bug in progress

All 19 comments

The allowed values for sap.m.IconTabHeaderMode are just not marked as @public. Will be fixed soon.

The fix will become visible with the next nightly build on https://openui5nightly.hana.ondemand.com/#/api/sap.m.IconTabHeaderMode/overview .

As the validation in the WebIDE is affect, it makes sense to downport this and two other similar fixes ( f9f7b96f14f3f19e8598dcebffc08f15fb4dadba and 252e6a95fdfa4972aeb8e55afdccfac66687411a ) down to 1.52.

Downports finally have been done.

1.52 has arrived already, the fix in 1.54 unfortunately has been too late for the upcoming 1.54.4 and will be contained in the next patch.

Hello,

My SAP Web IDE and SAP Web IDE Full-Stack still have the same a linter error when the headerMode property used in the IconTabBar.

Thanks,
Szabolcs

@sfodor: what UI5 version are you developing against (what version is configured in the project settings of the WebIDE)?

@codeworrior Hello Frank,
I have the same issue. I just check my SAPUI5 version and it says "latest(1.56.8)".

Strange. And do you experience this only for the headerMode property or also for others?

I checked the API metadata (https://sapui5.hana.ondemand.com/1.56.8/test-resources/sap/m/designtime/api.json) and it contains the necessary values. So it's not the old visibility issue.

Could you paste an XML snippet (assuming that you get the lint error in an XMLView), please?

I checked other properties: backgroundDesign and headerBackgroundDesign gave me no issues; however, tabDensityMode shows "The property or event name does not exist for the control.".

Here's an XML snippet:

<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="minutes.controller.ItemsList">
    <IconTabBar id="idIconTabBar" select="handleIconTabBarSelect" selectedKey="meetings" headerMode="Inline" tabDensityMode="Cozy">
        <items>
            <IconTabFilter id="iconTabComplete" text="{i18n>ItemsList.IconTab.ToDo}" key="complete" count="{itemsListView>/incomplete}"/>
            <IconTabFilter id="iconTabVerify" text="{i18n>ItemsList.IconTab.Verify}" key="verify" count="{itemsListView>/toVerify}"/>
            <IconTabFilter id="iconTabVerifyLater" text="{i18n>ItemsList.IconTab.VerifyLater}" key="verifyLater" count="{itemsListView>/toVerifyLater}"/>
        </items>
        <content>
            <List id="itemsListId" headerText="Select meeting" growing="true" growingThreshold="10">
                <headerToolbar>
                    <Toolbar>
                        <Title text="Action Items" level="H2"/>
                        <ToolbarSpacer/>
                        <SearchField id="itemSearchId" liveChange="onSearch" width="50%"/>
                    </Toolbar>
                </headerToolbar>
            </List>
        </content>
    </IconTabBar>
</mvc:View>

Properties taken from https://sapui5.hana.ondemand.com/#/api/sap.m.IconTabBar/controlProperties.

One more question: do you have a manifest.json, and if so, what does it specify as minVersion for UI5?

Yes, it's set to 1.30. I tried to change it to 1.56.8 - the issue stays.

The SAPUI5 version is "latest(1.56.8)" in Project Settings, the "minUI5Version" is "1.30.0" in my manifest.json,

I don't know how this works in detail in WebIDE, but I assume the min-version might be the root cause.

Especially the wording of the message "The property or event name _does not exist_ for the control." and the fact that tabDensityMode was introduced in 1.56 only suggest this to me.

headerMode was introduced in 1.40, so the version could also explain that one.

But someone with deeper knowledge of the WebIDE internals has to state how this can happen. Maybe the manifest.json is only evaluated at some point in time in the lifecycle of the project.

I'll forward this issue internally and ask them to comment.

Good points!

Those are JSDoc issues (most likely copy & paste) and need to be fixed.

But IMO this doesn't explain the message "The property or event name does not exist for the control", it would just prevent any value from being accepted. I've forwarded the issue to the WebIDE colleagues.

Is this issue resolved? I still have this issue in my Web IDE. My SAP UI5 version is 1.62.0
Regarding to the version of manifest.json, I changed my root version to the newest one, "_version": "1.14.0", and removed all the other version attributes in the subnodes. Is this correct? And my minUI5version looks like a variable,
"dependencies": {
"minUI5Version": "${sap.ui5.dist.version}",
Is this correct?
Thank you!

Is this issue resolved? I still have this issue in my Web IDE. My SAP UI5 version is 1.62.0
Regarding to the version of manifest.json, I changed my root version to the newest one, "_version": "1.14.0", and removed all the other version attributes in the subnodes. Is this correct? And my minUI5version looks like a variable,
"dependencies": {
"minUI5Version": "${sap.ui5.dist.version}",
Is this correct?
Thank you!

It seems that it is a bug.. This type is not included int the types section of sap.m.Library.js

BR,
Mahesh

The IconTabHeaderMode documentation is there:
https://openui5.hana.ondemand.com/#/api/sap.m.IconTabHeaderMode

But IconTabDensityMode does not show any values:
https://openui5.hana.ondemand.com/#/api/sap.m.IconTabDensityMode

Is this the enum you are now having a problem with? The values are not marked as public in the JSDoc...
I contacted the responsible developer to have a look.

Is this the enum you are now having a problem with?

It's actually both, IconTabHeaderMode and IconTabDensityMode.

IconTabHeaderMode

For IconTabHeaderMode, Web IDE recognizes that the type exists but displays the error when defining the property value, e.g. headerMode in sap.m.IconTabBar:

sap-web-ide-icontabbar-headermode-error
Error: "The property value <Inline> for enum type <sap.m.IconTabHeaderMode> of property <headerMode> is incorrect. Please enter the correct value."

IconTabDensityMode

Web IDE doesn't even recognize that the property tabDensityMode exists in IconTabBar:
sap-web-ide-icontabbar-tabdensitymode-error
Error: "The property or event name <tabDensityMode> does not exist for the control. Please enter the correct property or event name."

But I guess that could be fixed by adding @public annotation to each enum value.


  • SAP Web IDE Full-Stack
  • Version: 190214
  • "minUI5Version": "1.60.1"
  • SAPUI5 Version: _latest (1.62.0)_ (in the _Project Settings_)

@mahesh0431

This type is not included in the types section of sap.m.library.js

I'm not sure if adding it would solve the issue. There are other enum types which aren't included in the types: [] either but get recognized properly in Web IDE.

@akudev I think that's just a mistake and prepared a change for it. I'm also discussing the visibility of sap.m.SelectionDetailsActionLevel's values, similar problem.

A different issue but with the same symptom exists for sap.ui.table.TreeAutoExpandMode and sap.ui.commons.ColorPickerMode. They both are legacy names redirecting to other enums for compatibility reasons. I'll add at least a link to their documentation as well.

Was this page helpful?
0 / 5 - 0 ratings