what i learnt yesterday: [ ] in CFC return types

ColdFusion Add comments

After Sean learnt something earlier this week it was my turn. After playing around for the first time with the Eclipse CF Wizards I was looking at some of the code it generated in particular the CFCs. In some of the gateways i saw stuff like returntype=”myapp.somebean[]” - I’d never seen this syntax before and had always used a returntype of array but turns out i’ve been missing a treat for returning an array of objects of a certain type!

2 Responses to “what i learnt yesterday: [ ] in CFC return types”

  1. Ben Nadel Says:

    Is this validating that the return object is BOTH an array and that each index contains an object of that type? If so, that seems like a rather expensive validation.

  2. MrBuzzy Says:

    I always thought this one was a special directive for returning complex types (arrays of objects) in Web Services and such? Does it really serve any other purpose?

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in