John Beynon

Confessions of a code Junkie and anything else i fancy!

what i learnt yesterday: [ ] in CFC return types

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!

No related posts.

Tagged as:

2 Comments

  1. 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. 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 Response