passing paramters to component in flex
        Posted  
        
            by dubbeat
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by dubbeat
        
        
        
        Published on 2010-04-20T11:50:44Z
        Indexed on 
            2010/04/20
            11:53 UTC
        
        
        Read the original article
        Hit count: 278
        
flex
Hi,
I've got 2 files, my Application and a custom component. In my component I have a httpservice and a string named _requestUrl that is bindable. The httpservice uses this.
<mx:HTTPService id="srv"
                    url="{_requestUrl}"
                    result="parseHttpResult(event)"
                    resultFormat="xml"
                    method="GET"
                    useProxy="false">
    </mx:HTTPService>
In my application file I make an instance of my component in the onCreationComplete function.
In this function if I say
mycomponent._urlRequest ="http://mysite.com" the httpservice throws a null url error but if I say mycomponent.srv.url="http://mysite.com" it works fine.
Why is this?
© Stack Overflow or respective owner