I think you're probably passing etel.fileNum too early, there may be
some instantiation that needs to happen first.  Maybe add a var called
fileNum to the application and just set that, then have the etel
component read the fileNum via binding?

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy Rottman
Sent: Monday, February 06, 2006 8:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] intialize not working

I just migrated all of my flex 2.0 alpha code over to the beta
version. And I have found that initialize is not working. I have a
search that I am using (below) that calls a webservice to populate a
dg. When a user clicks on the desired record, it changes the current
state to an edit state. When the user enters the newstate, I have an
initialize in my mx:application tag, that uses a passed var from the
search to call and display data based on a pk. This worked great in
the alpha version, but it is not working now. Can someone give me some
insight on to why this wont work now.

I have also used creationComplete="" and this will call the databased
on the var fileNum, however when I search on a different file number
and click on it in my search, the same data as my first search is
still in the display.

search: 

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*"
width="100%" height="100%">
<mx:WebService id="srv" useProxy="false"
wsdl="http://*.*.*.*/cfc/adminHS2F.cfc?wsdl"; showBusyCursor="true" />
        <mx:Panel x="0" panelAlpha="1.0" height="100%" width="100%"
y="3"
title="View Transaction: Search">
        <mx:Script>
                <![CDATA[
                function qpListSearch(search){
                        srv.qpListSearch(search);}      
                
                
                public function ListState(FLD_FILENUM)
               { 
                        
                parentApplication.currentState = 'etel'; 
                parentApplication.etel.fileNum =
FSDG.selectedItem.FLD_FILENUM;
               }
                ]]>
        </mx:Script>
                <mx:Canvas height="100%" width="100%">
                        <mx:TextInput x="6" y="22" id="search"/>
                        <mx:Button x="184" y="22"
click="qpListSearch(search.text)"
label="Button"/>
                        <mx:DataGrid x="6" id="FSDG"
click="ListState(FSDG.selectedItem.FLD_FILENUM)"
dataProvider="{srv.qpListSearch.result}" y="71" width="100%"
height="80%">
                                <mx:columns>
                                        <mx:DataGridColumn
headerText="File Number"
columnName="FLD_FILENUM"/>
                                        <mx:DataGridColumn
headerText="Address" columnName="FLD_PROPNUM"/>
                                </mx:columns>
                        </mx:DataGrid>
                </mx:Canvas>
        </mx:Panel>
        
</mx:Canvas>

fileEdit. (only the party with the initialize)

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas width="100%" height="100%"
xmlns:mx="http://www.macromedia.com/2005/mxml";
initialize="qdListDisplay(fileNum);qdListDocs(fileNum)" xmlns="*">
<mx:WebService id="srv" useProxy="false"
wsdl="http://*.*.*.*/cfc/adminHS2F.cfc?wsdl"; showBusyCursor="true" />
        <mx:Script source="as/adminEditList.as" />
        <mx:Script>
                <![CDATA[
                        var fileNum = ''
                        
                ]]>
        </mx:Script>





--
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



 




--
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