我正在开发一个 Mura 插件,它使用 mura 标签来拉入组件并在页面上使用它。基本上我的插件需要调用$.dspObject('component',Arguments.componentid)
. 由于 mura 范围在插件方法中不可用,所以我猜我需要拉入一个组件 bean,但我不知道该怎么做。
<cffunction name="showPlayer" access="public" output="false" returntype="String">
<cfargument name="component" type="string" required="true" hint="The ID of the component that contains the playlist." />
<!--- Create the body content --->
<cfsavecontent variable="bodycode">
<cfoutput>#$.dspObject('component',Arguments.component)#</cfoutput>
</cfsavecontent>
</cffunction>
这是该方法的一个非常精简的版本(完整的 eventHandler 可以在GitHub上找到。
那么我将如何重写我的代码以将组件 bean 拉出(或我需要为它做的任何事情)?