Add View to AccordionItem

I have:

Accordion
  \\_Accordion Item 1 (Grid)
  \\_Accordion Item 2 (Form)

How can I replace Form in “Accordion Item 2” w/o loosing “Accordion Item 2”?
AccordionItem does not have methods “addView”, “removeView”.

Current solution:


	var Accordion = $$("UIAccordion");
	var formAIChild = Accordion.getChildViews()[1]; 

	if(formAIChild !== undefined){
		Accordion.removeView(formAIChild);
	};
	var formConfig = webix.markup.parse(<SomeText>);
	Accordion.addView(formConfig , 1); 

This solution deletes “Accordion Item 2” and replaces it with new childForm, instead of removing “Form” adding childForm into “Accordion Item 2”.

You can use webix.ui command to replace any existing view with new one.
Check the next code snippet http://webix.com/snippet/e216ca15

Here, content of one of accordion’s panels is replaced with the form

Great, thank you.
I spent enormous amount of time looking for a solution.