留言板

How to use Liferay.AutoFields events

Esteban Gàlvez,修改在8 年前。

How to use Liferay.AutoFields events

New Member 发布: 1 加入日期: 15-5-12 最近的帖子
Good morning everyone,
In a project I need to handle events that occur in Liferay.AutoFields.
I have implemented the events 'clone' and 'delete' but not undo. According to the documentation of Liferay is the OnClear event, but it does not work for me.
Can anyone help me?

<aui:script use="liferay-auto-fields">
 	new Liferay.AutoFields(
    {
    	contentBox: '#imputacion-fields',
        fieldIndexes: '<portlet:namespace />imputacionesIndexes',
       	on: {
       	 	'clone': function()		//Evento que se genera cuando se crea una linea nueva 
       	 	{
				...
		},
       		'delete': function(event) 
       		{
       			...
   	   	},
   	 onClear: function() {
         alert('All fields have been removed.')
  }
 	}).render();
</aui:script>


Thanks,