1 Reply Latest reply on Jan 4, 2011 10:49 PM by Wrataxas

    Accessing Inner components from the outer component

    genuinesolid

      I have built a really nice component which references several instances of another custom component I have written.  Each of my nested components makes a call to the outerdocument to trigger a handler function.  From that handler function I want to get the current values for all of my custom components and make a server side call.  But I am having trouble accessing them.  How do I access an inner component from the outerdocument.  For reference, here is a sample of what I am working on:

      <mx:DataGridColumn  editable="false" dataField="field1" wordWrap="true"  sortable="false" id="field1">
      <mx:headerRenderer>
      <fx:Component>
      <components:DataGridColumnFilterTextInput  text="filter1" width="100%" fontWeight="bold" 
      height="100%" editable="true" change="outerDocument.filterChangeHandler(event)"/>
      
      </fx:Component>
      </mx:headerRenderer>
      </mx:DataGridColumn>
      
      

       

      here is the outer change handler as of this moment:

           public function filterChangeHandler(event:Event):void
           {
                var str:String=(this.innerDocument[0] as DataGridColumnFilterTextInput).text; // this obviously does not work
                Alert.show("Str="+str);
           }