Versions Compared

Key

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

...

Code Block
languagejs
canvas.ns("namespace ID");

<namespace ID>.sampleListener = Class(canvas.Observable, 
{
    constructor: function(config) 
	{
        this.fm = config.fm;
    },
    
	registerHandlers: function() 
	{
		this.fm.registerHandler(CFEC.PRE_INITIALIZE, function(fm) 
		{
		
		});
		
		this.fm.registerHandler(CFEC.POST_FORM_RENDERER, function(fm) 
		{
		
	    });
		
		this.fm.registerHandler(CFEC.PRE_MODEL_LOAD, function(fm, record) 
		{
        
      	});
	}
});

CFLR.registerListener("<FORM_ID>", <namespace ID>.sampleListener);

// Form Container Action button listener
CABR.registerHandler('ACTION_BUTTON_ID','CONTAINER_ID', function (config)
{  });

Create a listener payments.intertransfer.js as follows:

Code Block
languagejs
canvas.ns("payments");

payments.paymentForm = Class(canvas.Observable,
{ 
	constructor : function (config)
	{
		this.fm = config.fm;
	}, 

	registerHandlers: function()
	{ } 
});

CFLR.registerListener("PAYMENT_FORM", payments.paymentForm); 

CABR.registerHandler('SUBMIT','PAYMENTS_CONTAINER', function (config)
{
	//Form submit action goes here
}); 

CABR.registerHandler('CLOSE','PAYMENTS_CONTAINER', function (config)
{
	CBXFORMCONTAINER.getActiveFormContainer().close();
});

...