Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the following table to create the form container. Also, see Form Containers for further details.

Id Id

Form ID

Container

ID

Title

Action

ID

Action Type

Position

BILLER_INFO




CONT_BILLER_INFO




BILLER_INFO




BTN_SAVE

Positive

1

BTN_ADD

Positive

2

BTN_DEL

Positive

3

BTN_CANCEL

Negative

4

...

The form should appear as shown:

Image RemovedImage Added
To add an instance of the form, use the fm.addNext('FORM_ID') API as shown:

Code Block
languagejs
CABR.registerHandler('BTN_ADD','CONT_BILLER_INFO', function (config)
{ 
	this.fm = config.frmObj;
	this.fm.fm.addNext('BILLER_DETAILS');
}); 

...

Code Block
languagejs
cbx.ns("my.listner.namespace"); my.listner.namespace.BillerInfoForm = Class(cbx.Observable,
 { 
	constructor : function (config)
		{ 
		this.fm = config.fm;
		}, 
	registerHandlers : function ()
	{
		var formIndex=null; 
		this.fm.registerHandler("cbxchange","OPT_BILLER", function(fm, event, fieldname, value, index, parent) 
			{ 
				//finding the index of the instance to be deleted formIndex=index; 
				var count = fm.getNumberOfSubForms('BILLER_DETAILS'); for(var i=0; i<count; i++) 
			{
					if(i!=index)
						{ 
							fm.model.setValue('OPT_BILLER',"",false,i,parent);
						}
			} 
		});
	} 
}); 

CFLR.registerListener("BILLER_INFO", my.listner.namespace.BillerInfoForm); 

CABR.registerHandler('BTN_ADD','CONT_BILLER_INFO', function (config)
{
	fm.removeAt(formIndex, 'FORM_BBAR_MULTI'); 
}); 

...