custom fields in NavItems rendered through fragment

Hi All

We are unable to get the custom field related to the NavItem in the fragment, we have performed below steps -

  1. Create a text custom field for SiteNavigationMenuItem through control panel as “promotion”
  2. Create a Menu Item and added value of “promotion” as true
  3. Create a fragment with source type navigationMenuSelector to render the content
  4. drop it on the page and select the menu items we created with custom field
  5. in fragment iterate through sourceObject.navItems and print expando attributes of the navItem
  6. Observe that its not printing"promotion", while one of the navitem has value in custom field.
  7. Its printing the custom fields size of the type of menu item like layout.
  8. The navItem are of type com.liferay.portal.kernel.theme.navItem, however the custom fields are created for SiteMenuNavigationItem.

How can we get the custom field value for actual the navItem?

HTML -

[#assign entries = sourceObject.navItems]
[#list entries as navItem] 
	[#assign customFields = navItem.getExpandoAttributes()]
	<br><b>${navItem.getName()}</b><br>
	<i>
	[#list customFields as customFieldKey, customFieldValue]
		key - ${customFieldKey}
	[/#list]
	<i>
[/#list]

Configuration -

{
	"fieldSets": [
		{
			"fields": [
				{
					"label": "source",
					"name": "source",
					"localizable": true,
					"type": "navigationMenuSelector"
				}
			]
		}
	]
}

Thanks