【问题标题】:CFSelect bind issue in ColdBox environmentColdBox 环境中的 CFSelect 绑定问题
【发布时间】:2013-03-06 03:42:13
【问题描述】:

我遇到了绑定问题,有时间咨询专家。

我有一个绑定到 cfc 的 cfselect。

 <cfselect name="events" id="events" selected="#form.event_id#" 
 bind="cfc:feat.models.dynform.getEventsByGroup({groups})" display="event_name" 
 value="nd_event_id" queryPosition="below">

这在我的本地环境中运行良好,在我的本地/www 目录下定义为"feat"。我的问题是当我将它移动到开发服务器时,我认为它位于"beat",即:

 bind="cfc:beat.models.dynform.getEventsByGroup({groups})"

我收到错误“未找到模型”,尽管模型存在。我认为这是因为开发服务器的排列方式与我的本地服务器不同。 ColdBox 配置中是否有关于这应该指向何处的线索?

我还尝试通过将模型放在 rc 集合中来更改绑定以调用模型(因此我不必使用与本地不同的标记):

 bind="cfc:#rc.dynformservice#.getEventsByGroup({groups})"

但是,我收到一个错误“无法将复杂数据类型转换为字符串”。

有什么建议吗?我欠你的任何帮助。

【问题讨论】:

  • 什么是rc.dynformservice? .
  • 冷箱处理程序中的请求集合,例如:function reconcile(event, rc, prc){ rc.dynformservice=getmodel("dynform");
  • 对我来说听起来像是一种复杂的数据类型。
  • 原来如此,在下面发布答案

标签: coldfusion bind cfml coldbox


【解决方案1】:

在路径中传递的冷箱方式是

 cfc:#getSetting('AppMapping')#.model.dynform... 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-28
    • 1970-01-01
    • 2022-01-18
    • 2010-10-18
    • 1970-01-01
    • 2019-05-29
    • 1970-01-01
    • 2019-11-14
    相关资源
    最近更新 更多