问题标签 [model-glue]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
104 浏览

coldfusion - 在模型胶水事件中,根据条件/结果使用不同的视图文件

以下是在 config 文件夹中的 xml 文件中使用的事件处理程序。

有什么方法可以根据结果值或属性包含不同的视图文件?

我需要保持事件名称一致。

0 投票
0 回答
88 浏览

iis - ModelGlue / ColdSpring configuration issue?

I've used ModelGlue and ColdSpring for years on previous projects without issue. I'm building this new website using CF10 ModelGlue 3.2.

I've downloaded and installed the framework, built the site on my local development MacBook without issue, and attempted to deploy it into the client's environment... Bad news!

They use IIS, and at first glance appears to be served from their webroot, but through some IIS voodoo and '/' mapping in CFAdmin, they serve

http://b.company.com/ ---> D:\inetpub\wwwroot\a\b\index.cfm

After fiddling around to find a placement for the frameworks, I have the settled on:

in D:\inetpub\wwwroot\a\b\Application.cfc:

When I run it, I get a MG framework instantiation issue of the first bean it tries to grab out of ColdSpring (which changes periodically):

However, the issue is actually coming from the parent bean (extends) failing to instantiate. Modifying the cfc slightly gives some diagnostics:

yields:

Notice that CS successfully locates and instantiates D:\inetpub\wwwroot\a\b\ModelGlue\gesture\module\XMLModuleLoaderFactory, but looks in a different directory (D:\inetpub\wwwroot\ModelGlue) for its parent. (For those unfamiliar, XMLModuleLoaderFactory extends="ModelGlue.gesture.factory.TypeDefaultingMapBasedFactory" as part of its cfc definition.


I'm at my wit's end; I've tried every possible configuration change, moved the libraries around,etc and come up short. As an external developer, I can't change their web server, but I do have full control over the App.cfc and everything below. Does anyone have any ideas what's going wrong?

Any help would be appreciated.


UPDATE (possibly solved)

I rolled back the ModelGlue version to 3.1.299 and this seems to have solved my issues.

I also overrode the CFAdmin '/' mapping to point to my application path

Application.cfc:

I'm not really sure what was going wrong with MG 3.2, but 3.1.299 seems to have helped.

0 投票
1 回答
118 浏览

redirect - 在模型胶中重定向

在将它从外部服务器移动到我们的内部服务器之前,我们正在并行运行这个应用程序。它是一个由两部分组成的应用程序:公共/非安全部分(目录 A)和安全部分(目录 B)。这一切都在 Model-Glue/Coldspring 中连接起来。

作为用户注册过程的一部分,有一个从目录 A 到 B 的重定向。但是,这会产生错误:“模型胶水:'/path/to/Direcory B/x.cfm 没有已知的事件处理程序’。”

这是 ModelGlue 片段:

我曾尝试将共享文件复制到目录 A,但这不是 DRY 解决方案,而且看起来像是 hack。也许,我应该指出,代码在外部服务器上的生产环境中工作,但在我们的开发环境中失败。

任何帮助将不胜感激。谢谢