sapui5 - UI5: Add Tree to IconTabFilter Content -


I have an icon tab filter that when I select the user, I want to show a tree.

I handle how the user selects the icon it has been argued here

I do not have a problem with my JS which will create the tree node . It is argued below: -

  var oModel = new sap.ui.model.json.JSONModel ({ "idocs1": [{ "Dokinm": "00063463" "Mestipp" "Matas", "status": "53", "Sdiaran": "EXTSYSl", "direct": "inbound", "message": "content 00,002,342 made", "message": [{ "message" "material 00002342 created"}], "section": [{ "segment": "ElMARAM", "fields": [{ "FieldName": "MATNR"}]}}}]}}); . Sap.ui.getCore () setModel (oModel); Var tgtPath = "/ idocs1 / 0 / segment"; Var oTree = new sap.ui.commons.Tree ("tree"); OTreekbindAggregation ( "nodes", Tijiteepath, function (SID, Oconteks) {var treePath = oContext.getPath (); var bindTextName = ''; if (Trypath. Index ( "fields")! == -1) {bindTextName = "FieldName";} other {bindTextName = "segment";} alert ( "here =" + Ocontekst + "----" + Baindtekstannam); return new sap.ui.commons. Tryanod () KbindProperty ( " Text ", BindTextName);}); Var myButton = new sap.ui.commons.Button ("btn"); MyButton.setText ("Hello World!"); MyButton PlaceAt ("idViewRoot - idViewDetail - Toolbar Content"); OTree PlaceAt ("idViewRoot - idViewDetail - Toolbar-content");  

This argument is in a method, which is applicable when the user selects a specific IconTab

I have this button to ensure that This will add something to the IconTab content (when commented on tree logic).

I noticed that if I was trying two buttons of the same ID, then the above code (i.e. method) is applied twice.

If I enable the logic of the tree, then the method is being said twice, thus I am getting errors for the duplicate tree node.

Any help That's very much appreciated.

thanks

Martin

Is there any reason Want to add content later? You can also add a specific content for each IconTab that shows when the user clicks on it. This can also solve your problem.

If this is not convenient for your case, then I think you should set the content on IconTabBar or IconTabFilter after clicking on the iconab content.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -