I have the following code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" >
        <mx:Script>
                <![CDATA[    
                import mx.controls.Alert;
                        public function submitForm():void
                        {
                                formSender.cancel();
                                formSender.send();              
                
                        }                       
                        private function getResultOk( r:Number, 
event:Event):void
                        {
                                if ( !r )
                                {
                                        Alert.show( 'Error sending 
data!!' );
                                        return;
                                }                               
                                Alert.show( String( 
this.formSender.lastResult ) );
                        }
                ]]>
        </mx:Script>
        <mx:HTTPService id="formSender"
                                
        url="http://localhost/toddad/TestPost.cfm";
                                        method="POST"
                                        showBusyCursor="true"
                                        useProxy="false"        
                                
                                        result="getResultOk( 1, 
event )"
                                        fault="getResultOk( 0, 
event )">
                                                <mx:request>
                                                
        <firstname>John</firstname><lastname>Smith</lastname>
                                                </mx:request>
        </mx:HTTPService>       
        <mx:HTTPService id="getToddLog"
                                
        url="http://localhost/toddad/ToddLogGet.cfm";>
        </mx:HTTPService>               
        <mx:Panel id="pnlToddLog" title="Todd Log" x="654" y="10" >
                <mx:DataGrid id="dgToddLog" 
dataProvider="{getToddLog.lastResult.ToddLog.Message}" width="315">
                        <mx:columns>
                                <mx:DataGridColumn 
headerText="Message" dataField="Message"/>
                        </mx:columns>
                </mx:DataGrid>
        </mx:Panel>             
        <mx:Form width="100%" height="100%">
                <mx:Button label="Send" click="submitForm();" />
                <mx:Button label="Get Data" click="getToddLog.send
();" />
        </mx:Form>      
</mx:Application>                               

This is my problem:
When the Flex app opens for the first time in a new browser and I 
press the Get Data button, the data grid populates the rows from the 
database table correctly.  If I press the Send button the new rows 
are added to the table in the database but when I press the Get Data 
button the new rows are not populated to the data grid. Only the old 
rows appear.  If I type the following address into the 
browser:http://localhost/toddad/ToddLogGet.cfm and hit the browser 
refresh button and then go back to the Flex app and hit the Get Data 
button then the new rows appear correctly.  If I close the browser 
and start it up again then the new rows appear in the data grid when 
I hit the Get Data button.  Is it possible the flex app is using a 
cached request and therefore the new rows do not appear in the 
datagrid.

Thanks for any input.
Todd Adelgren
[EMAIL PROTECTED]





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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

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