Skip to Content
0

Dynamic data binding with sap.ui.commons.MenuItem and sap.ui.commons.Menu

Jul 18, 2017 at 12:50 PM

71

avatar image
Former Member

Hi,

I am creating UI5 app and trying to load menu with submenu. I have explored about sap.ui.commons.MenuItem and sap.ui.commons.Menu controls but i couldn't bind my odata items to this menu item control.

can anyone help me to find the correct way for binding and please suggest me if there is any samples,

Thank you,

Ranjani Sekar

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Arjun Biswas Dec 05, 2017 at 04:19 AM
0

Hi Ranjani Sekar,

It is better not to use any sap.ui.commons control in you application, as most of them are deprecated. You can bind your OData to your menu by trying out the foll code :

	<u:Menu
			itemSelect="handleMenuItemPress"
                        items="/Your_Entity_Set_name">
            <u:items>
			<u:MenuItem
				text="{your_field_name}"
				icon="{your_field_name}"/>
            </u:items>
        </u:Menu>

Hope this helps,

Regards.

Share
10 |10000 characters needed characters left characters exceeded