Perhaps a bit off topic, but does relate to how I am using (perhaps
misusing m2).  Ok here it goes.  I am building an administrative tool
to allow users to create, update, or delete articles that are posted
to this website.  When a user updates an article, the old one is not
deleted, but made inactive and the updated article takes its place on
the website (as only active records are published).  Each article has
a version number so we can keep track who last updated it and when.

I can currently load the active article by entering in the article id
and have it displayed on a form that can be used to update it.
However, I want/need to have the ability to load a previous version of
the article from the database.  The best way to do do this is to have
previous version numbers in a drop down and when the user selects an
older version, an ajax call is made to get the data. Here is the
problem.  the ajax call is made outside of the framework so the
service layer that I am calling is not instantiated so the variables
set in the init() are not set.

Here is a rough description of how and what is called by the listeners
during an event.

articleListener (configures the articleService object) ->
articleService (has an init function which creates the article DAO
object) -> articleDAO (init sets the datasource name for all local
functions).

The above works fine as long as I am making use of the framework, but
ajax is outside of the framework.  Does anyone know how (or if) I can
call the articleService object, run its initialization function, and
call the correct method (which will make use of the articleDAO object)?

-- 
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en

SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to