i am a newbie trying to get started in Coldbox.
I am trying to implement a simple mvc with a contacts database on mysql 5 and CF10.
The contacts index and editor pages show but the create and save functions do not work.
the editor input fields show “#prc.contact.getFirstName()#” as values.
The delete function does work though.
Can you expand your description of what is not working? Are you getting errors, strange behavior, etc?
create and edit do not work.
Untitled.tiff (49.3 KB)
Also it might help to check the logs, are the logs setup for console or file based logs?
Personally one of the first things one should begin to learn is how to switch the logs on and how to use them, they can be extremely helpful in cases like this as the logs WILL provide the clues.
However if I am to guess, my first reaction is that the handler is throwing an error, which would be shown in the logs. Secondly it might not even being called correctly, again this would be shown in the logs.
So the first two things to check is that the event handler is not throwing an error in those handlers, and the second in no particular order would be to see if the correct handler is being called or even being called.
The code for the html page to display the contacts as you have them would help us as well.
Put cfoutput around your form.
Any time you see hashes in your input boxes then the ColdFusion is not running that code, this is a classic rookie ColdFusion error and not a ColdBox error.
ok cfoutput did the trick.
now the example is working.
I though views where injected into CFOUTPUT tags?
Nope they are not, and you do need to remember that unnecessary processing of HTML tags into ColdFusion to ignore actually slows your application down.
where do i switch logging on?
thanks for your help, much appreciated.
Logging is defined in the config.cfc I am assuming and I could be wrong that the lite has this ability.
But all the information for log is over at http://wiki.coldbox.org/wiki/LogBox.cfm