AS Export - Including nested controllers

4 views
Skip to first unread message

Soren Christensen

unread,
Mar 23, 2010, 2:13:16 AM3/23/10
to actives...@googlegroups.com
Hi,

Is there anyone out there that knows how to configure AS_Export such
that nested columns are included with all their fields from their AS
Controllers into the list of exported fields.

Right now I have the nested controllers showing up on the export list
and it appears as a hash in the exported file.

There must be a way to get all the fields to come out in the exported
controller.

/S

Ed W

unread,
Mar 25, 2010, 7:44:18 AM3/25/10
to actives...@googlegroups.com
Hi

> Is there anyone out there that knows how to configure AS_Export such
> that nested columns are included with all their fields from their AS
> Controllers into the list of exported fields.
>
> Right now I have the nested controllers showing up on the export list
> and it appears as a hash in the exported file.

From memory the AS_export view is basically the same as a normal AS
list, and in fact that's exactly what you get in an AS list if you don't
tell it what you want to see when you place an association on a view

As with vanilla AS, you can then override the display function for that
column to make it show something interesting, but in your case you kind
of want it to spawn extra columns rather than packing a large field into
a single column

There are a couple of ways around this - you can invent some extra fake
columns in the original controller and simply arrange for the values to
be passed through to the association (there is even a shortcut to do
this). Alternatively you could extend AS (and it would be a really
interesting feature) to kind of incorporate the same functionality - I
would suggest looking at the various view iterators and invent some
syntax for the columns[] array like :association.column to dig into the
association itself

Good luck

Ed W

Reply all
Reply to author
Forward
0 new messages