PDA

View Full Version : How can create the startmenu using data from background in the desktop example



lollypop
23 Aug 2009, 3:30 AM
Hi,all,I'm a new user of Ext,this is my problem,it's bores me for 3 days.. :((
It is about the desktop example in the ExtJs3.0 package.

I want create the startmenu using some data form background,the data will like this:

{menuName:'funcitionOne', menuCode:'001', parentCode:'0' }
{menuName:'subFunctionOne', menuCode:'001001, parentCode:'001' }
{menuName:'sub-subFunctionOne', menuCode:'001001001', parentCode:'001001'}
{menuName:'sub-subFunctionTwo', menuCode:'001001002 'parentCode:'001001'}

and this data will create a startmenu liks this:

|functionOne|->|subFunctionOne| ->|sub-subFunctionOne|
.............................................. ->|sub-subFunctionTwo|

http://farm3.static.flickr.com/2626/3848381852_4570839c0c.jpg

thanks for your browsing...please help me ..

lollypop
24 Aug 2009, 8:02 AM
I have worked out this problem,and you don't need to modify the source of desktop example:

1st:make menu use data,

2nd:use apply/applyIf add to launcher,like Ext.applyIf(mainMenu,{menu:myMenu});

but i don't know the efficiency of this solution.

if anyone who has the same problem ,and want more details,leave your E-mail.