default action

I have my default action for this app set to index. In my category controller I don’t have an index action, the default is list. Now I know I can do something like this

public void function index(event){
setNextEvent(‘category.list’);
}

but is there a way to set a default action for a controller?

You can’t yet, maybe in 3.1

You can however mask it:

function index(event){
myCategory(event);
}

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

It was not a big deal but it would be a nice feature :wink:

Thanks!

Yes, it is scheduled for next release. Basically you will do this in your handler:

component{

this.defaultAction = “dan”;

}

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com