JSONObject item = items.get(i).isObject();
JSONValue js = item.get("js");
if(js != null)
((VkMenuBarHorizontalEngine)VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(((IVkWidget)tree).getWidgetName()))
.addMenuItem(tree, item.get("html").isString().stringValue(), item.get("js").isString().stringValue());
else if(item.containsKey("child"))
{
JSONObject childObj = item.get("child").isObject();
JSONString widgetName = childObj.get("widgetName").isString();
Widget widget = VkStateHelper.getInstance().getEngine().getWidget(widgetName.stringValue());
VkStateHelper.getInstance().getEngine().addWidget(widget, ((IVkPanel)tree));