<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Mifjs forum — Mif.Tree, Mif.Menu - in the latest Mif.Menu how can I create a dynamic menu on show event]]></title>
	<link rel="self" href="http://www.mifjs.net/forum/feed/atom/topic/202/"/>
	<updated>2010-03-21T11:27:15Z</updated>
	<generator>PunBB</generator>
	<id>http://mifjs.net/forum/topic/202/</id>
		<entry>
			<title type="html"><![CDATA[Re: in the latest Mif.Menu how can I create a dynamic menu on show event]]></title>
			<link rel="alternate" href="http://mifjs.net/forum/post/764/#p764"/>
			<content type="html"><![CDATA[I've partialy resolved the issue firing  onBeforeShow event into  show method.]]></content>
			<author>
				<name><![CDATA[scramatte]]></name>
				<uri>http://mifjs.net/forum/user/38/</uri>
			</author>
			<updated>2010-03-21T11:27:15Z</updated>
			<id>http://mifjs.net/forum/post/764/#p764</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[in the latest Mif.Menu how can I create a dynamic menu on show event]]></title>
			<link rel="alternate" href="http://mifjs.net/forum/post/755/#p755"/>
			<content type="html"><![CDATA[Hello,

In the old  Mif.Menu I used  onShow to create dynamic menu on the fly. 

With the code below It doesn't works :
[code]
        contextMenu = new Mif.Menu({
            onShow: function(e) {
                    var widget, target = e.target;

                        if  (widget.getContextMenu) {
                                                     // getContextMenu method return json structure compatible with Mif.menu
                                                     this.load( widget.getContextMenu() );
                        }
                    }
                }        
        
            }).attach('pageWrapper').load([
                {
                    name: 'test'
                }
            ])

[/code]
Note that   If menu is empty 'show' event is never called and load method call into onShow trigger
don't do nothing because menu is already loaded. 

What is the solution to achieve this ?

I've created another post related indirectly to this issue bease show event doesn't send context event when fired :

[url]http://mifjs.net/forum/topic/203/[/url]

Thank you]]></content>
			<author>
				<name><![CDATA[scramatte]]></name>
				<uri>http://mifjs.net/forum/user/38/</uri>
			</author>
			<updated>2010-03-06T19:50:18Z</updated>
			<id>http://mifjs.net/forum/post/755/#p755</id>
		</entry>
</feed>

