
META-INF.resources.js.form_tabs_support.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.dynamic.data.mapping.form.renderer Show documentation
Show all versions of com.liferay.dynamic.data.mapping.form.renderer Show documentation
Liferay Dynamic Data Mapping Form Renderer
AUI.add(
'liferay-ddm-form-renderer-tabs',
function(A) {
var FormTabsSupport = function() {
};
FormTabsSupport.prototype = {
initializer: function() {
var instance = this;
instance.after('render', instance._afterTabsRender);
},
destructor: function() {
var instance = this;
var tabView = instance.getTabView();
if (tabView) {
tabView.destroy();
}
},
getTabView: function() {
var instance = this;
var tabView = instance._tabView;
if (!tabView) {
var tabs = instance.get('container').one('.lfr-ddm-form-tabs');
if (tabs) {
tabView = new A.TabView(
{
srcNode: tabs
}
);
instance._tabView = tabView;
}
}
return tabView;
},
_afterTabsRender: function() {
var instance = this;
var tabView = instance.getTabView();
if (tabView) {
tabView.render();
}
}
};
Liferay.namespace('DDM.Renderer').FormTabsSupport = FormTabsSupport;
},
'',
{
requires: ['aui-tabview']
}
);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy