Copy link to clipboard
Copied
Hi,
Have a problem and I'll probably explain this wrong, but here goes. I invoke a CFC:
<cfinvoke
component="cfc.price.PriceGateway"
method="getById"
id="1"
returnvariable="priceResults">
</cfinvoke>
that returns the following (from a cfdump):
Price Results - component cfc.price.PriceBean | |||||||
---|---|---|---|---|---|---|---|
PROPERTIES |
| ||||||
METHODS |
How would I grab the values of the PROPERTIES and display them on a page? For example, just the price, or just the priceid? I can't find an example and I've searched without results.
Thanks.
Copy link to clipboard
Copied
Try <cfoutput>#priceResults.properties.price#</cfoutput>
Copy link to clipboard
Copied
Thanks, but that errors:
Copy link to clipboard
Copied
Make property singular instead of plural.
Copy link to clipboard
Copied
Same error with property. What I did was change the return to a query and used:
<cfoutput query="priceResults">#price#</cfoutput>
That solved my issues and I thank you all for your suggestions.
Copy link to clipboard
Copied
Leave out the "properties" entirely. The data would be in priceResults.priceid, priceResults.description, and priceResults.price
A CFDump shows all the properties of the dump and any methods of the dump. You don't use the word "properties" or "methods" to access those items -- those words are just there to describe what you're looking at.