Ok i see that the factory is not actually being used to create the
EventContext instance for each request as there are still static
createobject references to ModelGlue.gesture.eventrequest.EventContext in
gesture/ModelGlue.cfc in handleRequest() and executeEvent().

Changing those calls to use
getBean("modelglue.eventContextFactory").new(...) seems to get things
working as i had expected.

So i guess the question is will this (or has it) been run through unit
testing and will it be one of the features included in the next release ?

Cheers, Chris


2010/1/25 Chris Blackwell <[email protected]>

> Dan,
>
> I saw that you created an EventContextFactory and corresponding bean in the
> ModelglueConfiguration.xml but when i try to override the factory bean in my
> coldspring.xml in order to use a slightly tweaked EventContext object i
> don't get back the object i was expecting.
>
> Heres my bean from Coldspring.xml
>
> <bean id="modelglue.eventContextFactory"
> class="ModelGlue.gesture.eventrequest.EventContextFactory">
>  <property name="modelGlue"><ref bean="modelglue.ModelGlue"/></property>
> <property name="statePersister"><ref
> bean="modelglue.statePersister"/></property>
>  <property name="viewRenderer"><ref
> bean="modelglue.viewRenderer"/></property>
> <property name="beanPopulator"><ref
> bean="modelglue.beanPopulator"/></property>
>  <property name="logWriter"><ref bean="modelglue.logWriter"/></property>
> <property
> name="objectPath"><value>model.util.EventContextPlus</value></property>
>  </bean>
>
> The following code in a controller
>
>  ec1 = getmetadata(event).fullname;
> ec2 =
> getmetadata(getmodelglue().getBean('modelglue.eventContextFactory').new()).fullname;
>  writeoutput(ec1);
> writeoutput("<br>");
> writeoutput(ec2);
>  abort;
>
> outputs
>
> ModelGlue.gesture.eventrequest.EventContext
> model.util.EventContextPlus
>
> Is the EventContextFactory not fully implemented, or am i doing something
> daft?
>
> -Chris
>

-- 
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