Generating display code

0 views
Skip to first unread message

Evangelos

unread,
Mar 10, 2010, 9:07:32 AM3/10/10
to Mach-II for CFML
Hi,

Where's the best spot in your mach-ii files to put display code of an
object, when you're looking to create these objects dynamically?

I want to create a view dynamically based on a list of objects (which
objects to use and their values are in a database which I query,
presumable with the gateway). Where is the best spot to generate the
display code that's going to be used for that specific objectType?
Does it go in the controller as a function that is called for each
objectType? Do you create a large list of if statements in a View, so
when you're looping through the objects with their types and values
the proper display code is used?

An object returned is for example a title with just text, a matrice
with numbers, a single numerical value or a large note of some
sort ... Each has its own way of being displayed.

I haven't done this before, with the idea of "code generation" in
mind. Do you need more info?

Brian Pickens

unread,
Mar 10, 2010, 10:58:31 AM3/10/10
to Mach-II for CFML
So, to be clear, you are returning markup from functions in your
objects?

Evangelos

unread,
Mar 10, 2010, 12:17:35 PM3/10/10
to Mach-II for CFML
I haven't gotten that far yet, because I am not sure where the best
place is, to put the markup.

On Mar 10, 11:58 am, Brian Pickens <brian.pick...@fccinteractive.com>
wrote:

Reply all
Reply to author
Forward
0 new messages