+ },
+ command : null
+ },
+ "add_nature" : {
+ label : "Add Nature ...",
+ icon : "org.argeo.security.ria/list-add.png",
+ shortcut : null,
+ enabled : true,
+ menu : "Natures",
+ toolbar : null,
+ callback : function(e){
+ },
+ submenuCallback : function(commandClass){
+ this._addNatureTab(commandClass, null, true);
+ },
+ submenu : [
+ {"label" : "Totot", "icon":"","commandId" : "toto"},
+ {"label" : "Totot", "icon":"","commandId" : "toto"}
+ ],
+ selectionChange : function(viewName, data){
+ if(viewName != "editor") return;
+ var iApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();
+ if(iApplet && iApplet.getCurrentNatureTabs() && iApplet.getAvailableNatures()
+ && iApplet.getCurrentNatureTabs().length < qx.lang.Object.getLength(iApplet.getAvailableNatures())){
+ this.setEnabled(true);
+ }else{
+ this.setEnabled(false);
+ }
+ },
+ command : null
+ },
+ "remove_nature" : {
+ label : "Remove Nature",
+ icon : "org.argeo.security.ria/list-remove.png",
+ shortcut : null,
+ enabled : true,
+ menu : "Natures",
+ toolbar : null,
+ callback : function(e){
+ this.removeSelectedTab();
+ },
+ selectionChange : function(viewName, data){
+ if(viewName != "editor") return;
+ var iApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();
+ if(iApplet && iApplet.getSelectedNatureTab() && iApplet.getSelectedNatureTab().getUserData("NATURE_CLASS")){
+ this.setEnabled(true);
+ }else{
+ this.setEnabled(false);
+ }