I’ve been progressing for awhile with Model-Glue: Unity and I’m liking it more and more. I do have some questions about how to do certain things in it though. I figured I would ask here, instead of bugging Joe directly for a couple reasons:
-
They might be basic, and someone could point me to a code sample that Google isn’t finding for me.
-
They’re not basic, and other people could benefit from them.
-
Somehow I made it to FullAsAGoog, and I’m giddy with Goog.
Question 1
Is there a good way to hold on to an event through an interrupting event like… say… a login request?
I’m going to event=object.edit?objectID=1. This requires a login, so the request gets passed on to a login form. Ideally the behavior after the login, would be to pass back to the original request.
I’ve tried a bunch of cludgy ways of doing that. I was wondering if there was a really elegant way of doing so?
Question 2
What is the best way to override the default events associated with scaffolds?
I’ve done a lot with using the reactor.xml file to connect records to reference tables like countries or states. In the list view, I would like to show the connected records.
I’m pretty sure I can write the right query using the query object syntax in Reactor, but I just don’t know where to do it. Build a new model cfc? Write a new function in one of the auto generated data cfc’s?
If anyone can point me to something I would be very appreciative.
Update: I think I’ve got a decent answer for 2. I created a view that I scaffolded only just for type=”list”. Then made the result of my object type=list scaffold objectView.list. Then I just rewrote the view for objectView.list to send edit,delete,and view requests to those methods in object, not objectView. Is there a better way though?