I wrote an application in SAPUI5 in WebIDE. When I add Select items to page it shows and error but the program can run without error what is the reason of the error in WebIDE?
Some part of the code:
<mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" xmlns:semantic="sap.m.semantic" xmlns:footerbar="sap.ushell.ui.footerbar" controllerName="xxx.controller.Worklist">
<semantic:FullscreenPage id="page" navButtonPress="onNavBack" showNavButton="true" title="{i18n>worklistViewTitle}">
<semantic:content>
.....
</semantic:content>
<semantic:customFooterContent>
// Here it shows error: Semantic Error: SAPUI5: The Association property is incorrect. Please enter the correct value.
<ActionSelect xmlns:sap.ui.core="sap.ui.core" selectedItem="Element sap.ui.core.ListItem#__item1" selectedKey="item1" selectedItemId="__item1" id="__select_lang">
<items>
<sap.ui.core:ListItem text="English" key="EN" id="__item1"/>
<sap.ui.core:ListItem text="German" key="DE" id="__item2"/>
</items>
</ActionSelect>
</semantic:customFooterContent>
</semantic:FullscreenPage>
</mvc:View>
The error message is:
error: Semantic Error: SAPUI5: The Association property is incorrect. Please enter the correct value.
And I tagged in the code where it is shown.
It's the selectedItem association: It does indeed contain an invalid value (which is ignored at runtime).
Associations are set via the id of an element in XMLViews.
You are using three ways to preselect an item at once. Please choose only one.
selectedItem is an association and has to be set to the id of the selected item. this aggregation is seldom used.
selectedKey has to be set to the key of the item that should be selected (EN or DE in your case).
selectedItemId has to be set to the id of the item that should be selected. this property is usually preferred over the selectedItem association.
In your example it should be like so:
<ActionSelect xmlns:sap.ui.core="sap.ui.core" selectedItemId="__item1" id="__select_lang">