Would the following be considered best practice fo...
# suitecommerce
c
Would the following be considered best practice for adding childviews to the SCFormView (formModle)? If not, what would be?
Copy code
var SCFormView = FormViewModule.SCFormView;

function MyCustomFormView(options)
{

	SCFormView.call(this, options.model);

	this.options = options;

	this.childViews = {
		'childViewA': function ()
		{
			return new childViewA({
				options: this.options
			});
		},
		'childViewB': function ()
		{
			return new childViewB({
				options: this.options,
			});
		}
	};

	this.template = my_form_view_tpl;

}
s
I've not tried it but yes I would assume you put it into the constructor function
👍 1