PDA

View Full Version : How to add dynamic data in a ContextMenu/Ext.menu.Menu?



harongas
2 Dec 2014, 12:36 AM
Hi,

I'm new to extjs and I am having hard time getting a dynamic data from a json file to be put on the context menu.

I used, Ext.menu.Menu and hard coded the items. Here's the code:



var contextMenu = Ext.create('Ext.menu.Menu', { //menu window for tile menu icon
width: 160,
height: 100,
floating: true,
items: [
{ text: 'Career Aspirations'},
{ text: 'Development Plan' },
{ text: 'Position History' }
]
}).showAt(theEvent.getXY());

- 51154

When the image in the upper right of the tile was clicked, it will show a context menu window. And the data in it should be dynamically created based on the employee selected shortcut page.

Employees have choose pages for themselves as a shortcut/accessed screens

harongas
2 Dec 2014, 11:46 PM
I already solved this :) hooray!

lumberjack
3 Dec 2014, 1:07 PM
Glad you were able to find a solution!