1

嗨,我有一个包含 getter 和 setter 的组件,它由会话变量的结构提供。当我调用该组件并cfoutput为该 getter 和 setter 使用标签时,输出会给出乱码作为结果。

cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_ADDRESS_ZIP_CODE@6187548c     cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_FLAGS@7bbfe559 
   cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_FLAGS@7bbfe559 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_RECORD_NUMBER@736a7587 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_RECORD_NUMBER@736a7587 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_ADDRESS_ZIP_CODE@6187548c 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_ADDRESS_ZIP_CODE@6187548c 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_WEIGHT@524a2d43 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETCUSTOMER_WEIGHT@524a2d43 
cffunctions_allDefinedSessnFunct2ecfc3324199482$funcGETVIN@3e1b3ea

当我对传递的变量值执行CTRL+F时,我会在 ColdFusion 调试信息中找到它们。
我想获得必要的 cfoutput 值,这是我之前想要的。

4

2 回答 2

3

从各方面来说,我会说你输出的是组件本身,而不是它的字符串属性之一。检查您的输出代码。

于 2010-07-28T02:36:57.450 回答
0

你在做这个吗?

<cfset allDSF = createObject("component", cfc.allDefinedSessnFunct") />
<cfoutput>#allDSF.getCUSTOMER_ADDRESS_ZIP_CODE()#</cfoutput>

一些代码将帮助我们帮助您...

于 2010-07-28T06:56:06.947 回答