I have a Panel in my application that needs to include different form
stuff based on what a user chooses in a ComboBox. I have a Panel that
looks like:

<mx:Panel title="Message Specifics" width="100%" height="100%"
id="editMessageSpecificsPanel"/>

Based on the selection they choose in the ComboBox, I need what shows
up in the Panel to change. I have created several MXML files that have
an HBox that lays out what the Panel's internals need to look like.
One very simple one looks like:

<mx:HBox width="100%" xmlns:mx="http://www.macromedia.com/2003/mxml";>
      <mx:Form width="100%" marginTop="5" marginBottom="0">
        <mx:FormItem label="Text">
          <mx:TextArea id="messageText" text="" width="250"
height="80" enabled="false" editable="true" />
        </mx:FormItem>
      </mx:Form>
    </mx:HBox>

I call, upon the change event on the ComboBox. It contains a bunch of
objects, with the property "resource" containing the name of the MXML
file I need to include:

private function loadMessageSpecificsPanel(event) {
        var resource = event.target.selectedItem.data.resource; // Get the
name of the MXML file we need
        var child = editMessageSpecificsPanel.createChild(resource,
undefined, {label:'TEST', width:'100%', height:'100%'});
}

This isn't working though. Even though child IS getting populated with
something, it's not correct, doesn't have any of the variables I
specified in the included MXML, and the Panel in the UI is still blank. 

Any help is MUCH appreciated!

-Josh Oransky




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to