<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Mifjs forum — Mif.Tree, Mif.Menu - MifMenu - update of tree structure]]></title>
		<link>http://mifjs.net/forum/topic/56/</link>
		<description><![CDATA[The most recent posts in MifMenu - update of tree structure.]]></description>
		<lastBuildDate>Sun, 26 Oct 2008 20:45:13 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[MifMenu - update of tree structure]]></title>
			<link>http://mifjs.net/forum/post/203/#p203</link>
			<description><![CDATA[moro,

Suppose I initialize context menu with one element:

list: {
    items: [
    {
        name: 'new: ONE',
        onAction: function(){
            alert('new');
            }
        }
    ]
}

It is attached to a DIV element (displayed on left-click), showing and works fine.

Now, I need to replace 'new: ONE' with 'new: TWO' element:

items: [
{
    name: 'new: ONE',
    onAction: function(){
        alert('new');
        }
    }
]

How can I do it without totally re-instantiating the whole class. Is there a method to "update" the existing menu based on new 'list' parameter?

For example, I need to update menu items based on a state of other page components. If there's more that one item selected on the page - menu should have "DELETE ALL" entry dynamically inserted after "DELETE".

Thanks]]></description>
			<author><![CDATA[dummy@example.com (temuri)]]></author>
			<pubDate>Sun, 26 Oct 2008 20:45:13 +0000</pubDate>
			<guid>http://mifjs.net/forum/post/203/#p203</guid>
		</item>
	</channel>
</rss>

