<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.evenamonkey.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>even a monkey - modelglue</title>
 <link>http://www.evenamonkey.com/taxonomy/term/29/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>MG:Unity - Calling your own custom reactor gateway methods using a Generic list</title>
 <link>http://www.evenamonkey.com/mg_unity_calling_your_own_custom_reactor_gateway_methods_using_a_generic_list--2007--doug_sims</link>
 <description>&lt;!-- google_ad_section_start --&gt;
&lt;p&gt;Are you guys using the ModelGlue generic list? A basic generic list (using reactor as the orm) calls the getByFields() method in the reactor gateway for the object you specify.&lt;/p&gt;
&lt;p&gt;for example, if you broadcast this message in your eventhandler:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;message name=&amp;quot;modelglue.genericList&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;object&amp;quot; value=&amp;quot;user&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;criteria&amp;quot; value=&amp;quot;userID&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/message&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h4&gt;Would call getByFields(UserID={userIDValueInTheViewState})&lt;/h4&gt;
&lt;p&gt; and stuff the results into the viewstate.&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;br /&gt;
Well, If you need complex query results (joins etc), you can specify the gateway method to call and modelglue will pass on the criteria as arguments to your custom method.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;message name=&amp;quot;modelglue.genericList&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;object&amp;quot; value=&amp;quot;user&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;criteria&amp;quot; value=&amp;quot;userID&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;gatewayMethod&amp;quot; value=&amp;quot;getUserInfo&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/message&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Then ModelGlue will take the results and stuff them into the viewstate just like any other generic list.&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;
</description>
 <comments>http://www.evenamonkey.com/mg_unity_calling_your_own_custom_reactor_gateway_methods_using_a_generic_list--2007--doug_sims#comment</comments>
 <category domain="http://www.evenamonkey.com/monkeyblog/generic_database_messages">generic database messages</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/modelglue">modelglue</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/reactor">reactor</category>
 <pubDate>Wed, 09 May 2007 09:32:27 -0400</pubDate>
 <dc:creator>Doug Sims</dc:creator>
 <guid isPermaLink="false">49 at http://www.evenamonkey.com</guid>
</item>
<item>
 <title>Organizing ModelGlue Events</title>
 <link>http://www.evenamonkey.com/organizing_modelglue_events--2006--doug_sims</link>
 <description>&lt;!-- google_ad_section_start --&gt;
&lt;p&gt;This may be old news, but did everyone know you can include ModelGlue.xml file within your main modelglue.xml files. The framework has provided an  tag within the modelglue config file. you can include as many XML files as you need as long as they are formatted correctly.&lt;/p&gt;
&lt;p&gt;The include tag goes after the opening&lt;code&gt; &amp;lt;modelglue&amp;gt; &lt;/code&gt;tag and before the first &lt;code&gt;&amp;lt;controller&amp;gt;&lt;/code&gt; tag&lt;/p&gt;
&lt;p&gt;then you can group the event handlers into multiple files to keep them organized in a logical way. &lt;/p&gt;
&lt;p&gt;example:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;modelglue&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;include template=&amp;quot;/config/UserEvents.xml&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;lt;include template=&amp;quot;/config/AdminEvents.xml&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;controllers&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;
</description>
 <comments>http://www.evenamonkey.com/organizing_modelglue_events--2006--doug_sims#comment</comments>
 <category domain="http://www.evenamonkey.com/monkeyblog/coldfusion">coldfusion</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/modelglue">modelglue</category>
 <pubDate>Tue, 18 Jul 2006 17:31:49 -0400</pubDate>
 <dc:creator>Doug Sims</dc:creator>
 <guid isPermaLink="false">39 at http://www.evenamonkey.com</guid>
</item>
<item>
 <title>Chaining ModelGlue Generic Commit  Events</title>
 <link>http://www.evenamonkey.com/chaining_modelglue_generic_commit_events--2006--doug_sims</link>
 <description>&lt;!-- google_ad_section_start --&gt;
&lt;p&gt;I have really been loving the generic ORM stuff that is part of ModelGlue 2.0. I had been doing way to much work to stuff the objects we needed into the viewstate.   Now I have been able to remove countless listeners and broadcasts I was using to get various objects when needed.&lt;br /&gt;
Now a generic read takes  care of that.&lt;/p&gt;
&lt;p&gt;The basic functionality of the generic events are documented at http://docs.model-glue.com so I wont get into how to use them, but one thing that isn&#039;t documented is how to handle updates to multiple unrelated objects in the same form post( event-handler) &lt;/p&gt;
&lt;p&gt;Here is how I am doing it, It works like a charm for quick prototyping,as far as I am concerned.&lt;/p&gt;
&lt;p&gt;Lets say I have 2 objects, Cinders and Ashes. I am collecting this data on the same form and I need to handle the validation and update the results. I need two generic commit message broadcasts&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;message name=&amp;quot;modelglue.GenericCommit&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;object&amp;quot; value=&amp;quot;Cinder&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;CinderId&amp;quot; value=&amp;quot;Cinder&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/message&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;message name=&amp;quot;modelglue.GenericCommit&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;object&amp;quot; value=&amp;quot;Ashes&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;argument name=&amp;quot;AshesId&amp;quot; value=&amp;quot;Ashes&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/message&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;My form lives at an event called &quot;CindersAndAshes.form&quot; and submits   to an event called&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;
&lt;p&gt;&lt;a href=&quot;http://www.evenamonkey.com/chaining_modelglue_generic_commit_events--2006--doug_sims&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.evenamonkey.com/chaining_modelglue_generic_commit_events--2006--doug_sims#comment</comments>
 <category domain="http://www.evenamonkey.com/monkeyblog/coldfusion">coldfusion</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/generic_database_messages">generic database messages</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/modelglue">modelglue</category>
 <pubDate>Fri, 14 Jul 2006 15:42:22 -0400</pubDate>
 <dc:creator>Doug Sims</dc:creator>
 <guid isPermaLink="false">38 at http://www.evenamonkey.com</guid>
</item>
<item>
 <title>Perfect Unity between Model-glue 1 and    2</title>
 <link>http://www.evenamonkey.com/perfect_unity_between_model_glue_1_and_2--2006--doug_sims</link>
 <description>&lt;!-- google_ad_section_start --&gt;
&lt;p&gt;I have been working on a gigantic Modelglue 2 app at my day job. to aid in information exchange we had been using &lt;a href=&quot;http://ray.camdenfamily.com/projects/canvas&quot;&gt;canvas wiki&lt;/a&gt; (thanks &lt;a href=&quot;http://ray.camdenfamily.com/&quot;&gt;Ray!&lt;/a&gt; ). We have been using MG2 since its infancy (original semi-public beta in April). &lt;/p&gt;
&lt;p&gt;everything has been working better that expected, however, a few SVN updates ago the wiki stopped working with a Bean creation error. Apparently this is due to the reactor config path.&lt;/p&gt;
&lt;p&gt;Since our root site is a Unity app, the reactor bean in the coldspring config looks like this:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;constructor-arg name=&amp;quot;pathToConfigXml&amp;quot;&amp;gt;&amp;lt;value&amp;gt;/config/Reactor.xml&amp;lt;/value&amp;gt;&amp;lt;/constructor-arg&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;When you try to launch the nested app, it doesnt like the path and gives this error:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt; Bean creation exception during init() of ModelGlue.unity.eventhandler.EventHandlerFactory&lt;br /&gt;Bean creation exception during init() of ModelGlue.unity.orm.ReactorAdapter&lt;br /&gt;The error occurred in C:\Inetpub\wwwroot\WebFiles\coldspring\beans\DefaultXmlBeanFactory.cfc: line 539&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\coldspring\beans\DefaultXmlBeanFactory.cfc: line 332&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 16&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 319&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 49&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\ModelGlue\unity\loader\FrameworkLoader.cfc: line 63&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\ModelGlue\unity\ModelGlue.cfm: line 48&lt;br /&gt;Called from C:\Inetpub\wwwroot\WebFiles\ModelGlue\ModelGlue.cfm: line 1&lt;br /&gt;Called from C:\Sandboxes\Sandbox2\wiki\index.cfm: line 25&lt;br /&gt;537 : 								&amp;lt;cfthrow type=&amp;quot;coldspring.beanCreationException&amp;quot;&lt;br /&gt;538 : 									message=&amp;quot;Bean creation exception during init() of #beanDef.getBeanClass()#&amp;quot;&lt;br /&gt;539 : 									detail=&amp;quot;#cfcatch.message#&amp;quot;&amp;gt;&lt;br /&gt;540 : 							&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;541 : 						&amp;lt;/cftry&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h2&gt;How I fixed It&lt;/h2&gt;
&lt;p&gt;I simply copied the coldspring.xml and reactor.xml to:&lt;br /&gt;
 webroot/wiki/config&lt;br /&gt;
and changed the reactor config constructor-arg to&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;constructor-arg name=&amp;quot;pathToConfigXml&amp;quot;&amp;gt;&amp;lt;value&amp;gt;/wiki/config/Reactor.xml&amp;lt;/value&amp;gt;&amp;lt;/constructor-arg&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I did try to make the path relative (&quot;config/reactor.xml&quot; not /config/reactor.xml&quot;) but that didn&#039;t seem to work either. Please let me know if there is a better fix!&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;
</description>
 <comments>http://www.evenamonkey.com/perfect_unity_between_model_glue_1_and_2--2006--doug_sims#comment</comments>
 <category domain="http://www.evenamonkey.com/monkeyblog/coldfusion">coldfusion</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/coldspring">coldspring</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/modelglue">modelglue</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/reactor">reactor</category>
 <pubDate>Fri, 14 Jul 2006 14:57:18 -0400</pubDate>
 <dc:creator>Doug Sims</dc:creator>
 <guid isPermaLink="false">37 at http://www.evenamonkey.com</guid>
</item>
<item>
 <title>Hello World</title>
 <link>http://www.evenamonkey.com/hello_world--2006--doug_sims</link>
 <description>&lt;!-- google_ad_section_start --&gt;
&lt;p&gt;just when you thought the internet had enough blogs about everything, here is one more to add to the pile.&lt;/p&gt;
&lt;p&gt;A blog about a monkey having an idea? not exactly. more like a blog about modern web development (web &amp;gt; 1.5) and the tools to involved in designing and developing achieve rich web applications using Coldfusion, java, AJAX, flex, ROR, etc.&lt;/p&gt;
&lt;p&gt;As background,I have been a coldfusion web developer for the last 7 or 8 years and have gradualy moving towards Object Oriented development. I am currently infatuated with Reactor(&lt;a href=&quot;http://doughughes.net&quot;&gt;doughughes.net&lt;/a&gt;) , ModelGlue Unity (&lt;a href=&quot;http://modelglue.com&quot;&gt;modelglue.com&lt;/a&gt;) and coldspring(&lt;a href=&quot;http://coldspringframework.com&quot;&gt;coldspringframework.com&lt;/a&gt;).&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;
</description>
 <comments>http://www.evenamonkey.com/hello_world--2006--doug_sims#comment</comments>
 <category domain="http://www.evenamonkey.com/monkeyblog/coldfusion">coldfusion</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/evenamonkey_com">evenamonkey.com</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/modelglue">modelglue</category>
 <category domain="http://www.evenamonkey.com/monkeyblog/reactor">reactor</category>
 <pubDate>Thu, 29 Jun 2006 02:24:26 -0400</pubDate>
 <dc:creator>Doug Sims</dc:creator>
 <guid isPermaLink="false">34 at http://www.evenamonkey.com</guid>
</item>
</channel>
</rss>
