ok, that's clear. custom scaffolding's results in decorating the generated
event handlers and not overriding them. I was looking for overriding the
generated event handler "comit "since I thought I couldn't update a record,
but there's no need for since I found out how to do that.
Just wondering why I am not getting a <cfdump><abort> in my controller's
method since the message tag is there in the generated Scaffold.xml. I 'll
look into the MG debugging if the event fires and where it leads to.

Anyway, thanks for bearing with me on this one,

Marc

On Wed, Jan 25, 2012 at 4:14 PM, Dan Wilson <[email protected]> wrote:

> Yup,. that makes total sense. I think I see what you were getting at
> initially.
>
> Model Glue scaffold customization is additive and will always decorate the
> base scaffold with your customizations.
>
> In your case, I think you just want to define an event handler called
> Vrienden.Commit, rather than use the scaffold tag.
>
> Now, if you need to change EVERY xxx.Commit event handler generated by
> Model Glue, we have something that will let you do that. Basically, you can
> change the patter used by MG to suit your custom needs, and when MG needs
> to generate a type of scaffold (like Commit), it'll use your pattern every
> time, and not the built in one.
>
> If, in fact you need to do that, let me know and I'll dig up specifics on
> how to do it.
>
>
> DW
>
>
> On Wed, Jan 25, 2012 at 9:40 AM, marc <[email protected]> wrote:
>
>> Hi Dan,'
>>
>> Thanks for pointing out the Scaffolds.xml, overlooked that one.
>>
>> I found out that if I add
>>
>>     <scaffold object="vrienden" type="delete,edit,list"
>> event-type="mainLayout" />
>>
>> to my custom scaffolds.xml, the generated scaffolds.xml contains the
>> generated eventhandlers for those 3 types (delete,edit,list).
>>
>> When I add
>>
>>      <scaffold object="vrienden" type="commit" event-type="mainLayout">
>>         <broadcasts>
>>             <message name="vrienden.commit" />
>>         </broadcasts>
>>         <results>
>>             <result do="vrienden.list" />
>>         </results>
>>     </scaffold>
>>
>> to my custom scaffolds.xml , in the generated Scaffolds.xml an entry is
>> generated for the commit eventhandler. It contains the default
>> ModelGlue.genericCommit handler in <broadcasts> and the default event
>> "vrienden.edit" in <results>.
>> In addition my custom message <message name="vrienden.commit" /> is added
>> _after_ the default genericCommit in <broadcasts> .
>> So whatever I add in my custom scaffold tag is added after the
>> <broadcasts> tag in the generated Scaffolds.xml.
>> In the generated Scaffolds.xml <results> section, my custom result
>> <result do="vrienden.list" /> is added _before_ the default
>> result.vrienden.Edit.
>>
>> So whatever I specify in custom scaffold.xml is _added_ to the generated
>> events and doesn't overrule it.
>> Plus the order in which things are added (before or after the generated
>> tags) is not consistent.
>>
>> *But* I just saw in your pastebin that you have a <controllers> section
>> containing a listener for your custom event "test" in Scaffolds.xml. I have
>> no such section in generated Scaffolds.xml. Maybe that's why my custom
>> added event handler doesn't get executed?
>>
>> See http://pastebin.com/Sc2cfzu1 for my generated and custom
>> Scaffolds.xml.
>>
>> Marc
>>
>> --
>> Model-Glue Sites:
>> Home Page: http://www.model-glue.com
>> Documentation: http://docs.model-glue.com
>> Bug Tracker: http://bugs.model-glue.com
>> Blog: http://www.model-glue.com/blog
>>
>> You received this message because you are subscribed to the Google
>> Groups "model-glue" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/model-glue?hl=en
>>
>
>
>
> --
> Plutarch - "The mind is not a vessel to be filled but a fire to be
> kindled."
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en




-- 

Met vriendelijke groet,

Marc Bakker

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to