I've got a custom MXML component called GridView that includes a
DataGrid and some other display objects, such as a bit of text. The
component uses one HTTPService to fetch the column definitions and
another to fetch data for the grid. The idea here is to be able to
store and configure DataGrid definitions on the server and then buld
the DataGrid on-the-fly at runtime in the Flash player. Right now,
this is all working in my simple test case.

In my simple case, the MXML component passes the HTTPService a name
that specifies what grid settings to download. Imagine:

    url="http://127.0.0.1/GetGridProfile/people.xml";

or

     url="http://127.0.0.1/GetGridProfile/events.xml";

What I want to pass in like a parameter to the MXML component is
"people" or "events". (Or what have you - there may be any number of
profiles.) In my test case I've got a specific profile name hard-coded
in as I wanted to make sure I had the DataGrid working and so on. The
problem is, I can't sort out a straightforward way to pass parameters
into the new instance of GridView. I've googled around and see that
you can't pass parameters to a custom MXML component, so I'm curious
to know what technique I should try. I can convert the MXML to an AS
class, but I find it a lot quicker and easier to develop in MXML. So,
I'm hoping for a technique that lets me use my MXML component.

Any suggestions or links to helpful blogs or articles I've missed
would be much appreciated!

Reply via email to