Someone asked me on IRC yesterday what values are reserved in the viewState for Model-Glue. Since Model-Glue doesn't have the best documentation yet (poke Joe!), I pinged him and did a bit of testing. There are currently only four values that exist by default. You should avoid using a viewState/event arg value with these names:
- event: The name of the current event. This could be useful for debugging/logging.
- eventValue: I believe this is simply the URL variable checked for events. Model-Glue lets you configure this. I've never had a need to though.
- myself: A link back home. This is useful in building links back to your Model-Glue app, as you can use this value and just append the link, like so: <a href="#viewState.getValue("myself")#eventNNN">
- self: This is the value that tripped up my friend on IRC. As far as I know it is just a pointer to the file name of the core Model-Glue file (index.cfm typically).
Archived Comments
G'day Ray,
I found this blog post after a quick search on google for reserved words in model-glue. I came across an issue with a form field named "version" in on of my apps.
Do you know if there is a more extensive list of reserved words anywhere?
http://blog.constantconfusi...
Cheers,
Simon
Version shouldn't be reserved. Was this with MG3?
I think we have version 2.0.304
Looking at your blog post - I'm not so sure this is a conflict w/ the core MG files. I think it might be something else. Maybe try some intensive logging?
MG wouldn't modify the form struct after a submission would it?
I dumped out form as well as the event struct and both had been changed. It is looking like something else might be the culprit.
Cheers,
Simon
Try adding some debugging to your Application.cfm file. Ie, log form.version. This will be run before MG does anything.