That is because the handlers are in their corresponding modules.
I am not sure I understand the question, you have a layout theme that you wish to modify to show the captcha. Is this a custom page or are you hard coding the captcha into the view?
Or have you dropped ContentBox into an existing ColdBox application, trying to get the widget to work?
Anyway the CB helper or using widgets is what you need.
For example
#cb.widget(“widgetName”)#
Will then call up the widget for display, and render that into the view it was called from.
Ok, at the moment I have a Handler living in root, and a plugin (reCaptcha) which now is showing or working fine.
My problem at the moment is: when I submit the form to my root/handler from a layout in contentbox I need to redirect the user back to the same form page, but with the information of my form persisted into the rc
But at the moment when I use the setNextEvent(event=foo,persist=‘bar’) and try to drop rc.bar in my layout page… I get the error that the key ‘bar’ does not exist.
Without wrapping that handler into a module, you aren’t going to be able to run that unless you make changes to ContentBox to sit into an existing ColdBox application.
You can execute anything from the parent application but you must use the reserved “parent” route if ContentBox is in UI mode. This means you can do
/parent/handler/action
To any handler in your root appliction. Modules are different, they have their own entry point. But for handlers in your root “handlers” folder, you must use the “/parent” reserved route to execute this.
I use this all the time for form submissions, that’s actually how the store works in ortussolutions.com.
In your form you must store the location of where you are, you can do something like: event.getCurrentRoutedURL().
But you most definitely can submit to any root handler.