RubyAmf + DataGrid Binding

Hi there!

I’m trying to bind some data from my Rails application inside a Flex
Datagrid, and i’m just wondering why this code don’t work!

flex Code:

</mx:Script>

<mx:DataGrid id=“dg” width=“600” height=“400”>
mx:columns
<mx:DataGridColumn dataField=“id”/>
</mx:columns>
</mx:DataGrid>
<mx:Panel width=“600” height=“400” x=“610” id=“productPanel”
title=“Prodotti”>
<mx:Label id=“resultTxt” />
<mx:Button label=“Align” click=“load(event)” />
</mx:Panel>

StoreController Code

def retrieveProducts
respond_to do |format|
format html
format.amf {render :amf => Product.find(:all) }
format.xml {render :xml => Product.find(:all) }
end
end

from the console i see that the application retrieve the data, but the
Datagrid remains empty! :frowning:

some word on this?

thanks a lot in advance!

enzo rivello

Update:

actually it load the data
the problem is that the data remains invisible!
someone can explain me why?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs