I’m new to Coldbox. I’m developing simple register application for this when user submit my registration form I needs to submit root/modules/users/handlers/main.cfc regsubmit().
how can I submit my page to above function from root/views/.\
Do I need to add Wirebox mappings for this. Please suggest me the best practice for this.
Can I make a suggestion, please read up on the MVC pattern.
But in a nutshell, when you send or request anything, it is handled through an Event Handler. This is the controller in the MVC pattern, in here you then provide the logic for what the handler needs to do.
Like Andrew mentioned, URL’s are handled by ColdBox’s routing engine. If you want to customize them, you add SES routes. On the other hand, WireBox mappings are used to create names to talk about objects. While useful, this has no bearing on public URL routing in your application.
In your module’s ModuleConfig.cfc the this.entryPoint is going to be the first part of your URL route. Let’s pretend you have this:
this.entryPoint = ‘users’;
So, your handler/action inside that module is “main.regsubmit”. When we put those together, we get this: