Flex的Datagrid中选择多行并发送到AMFPHP后端 [英] Flex Datagrid select multiple rows and send to amfphp backend
问题描述
我是研究在互联网上围绕论坛的一些解决方案,以发送和ArrayCollection中,以AMFPHP但我没有找到良好的反应,我怎么可以访问PHP端阵列,包括到MySQL表。
I was researching over the forums around the internet for some solution to send and ArrayCollection to AmfPHP but I didn't find good responses for that and how I can access the array on PHP side to include into a MySQL table.
我的问题:
我有一个Flex数据网格填充了一些姓名和电子邮件,我想创建一个方法来允许用户创建一个组,选择名称是该组的一部分。我在Flash Builder调试器中的数据正在发送好ArrayCollection的(从载体转化也对象),但问题仍然看到了我怎么可以访问此阵列上PHP端。
I have a Flex datagrid populated with some Name and Email and I want create a way to permit users to create a group and select the Name to be part of this group. I saw in Flash Builder debugger that the data are being send good as ArrayCollection (transformed from Vector to Object also) and the problem still in how can I access this array on PHP side.
下面是ArrayCollection中被发送到AMFPHP:
Here is ArrayCollection being send to AmfPHP:
[0] Object (@cf87311)
[1] Object (@d4bfcb9)
[2] Object (@d4d3479)
下面是数组的键和值:
[0] Object (@cf87311)
id "2"
nome "David"
username "david"
[1] Object (@d4bfcb9)
id "3"
nome "jose"
username "jose@jose.com"
[2] Object (@d4d3479)
id "4"
nome "joao"
username "joao@joao.com"
有谁知道我必须做的,有机会到外地ID,在这阵?
Does anyone know what I have to do to have access to the field "id" in this array ?
祝商祺!
拉斐尔·塔瓦雷斯
推荐答案
AMFPHP将会把你的动作对象转化为PHP对象。通过ArrayCollection中为一个参数。在PHP端你可以使用它作为:
AMFPHP will translate your actionscript object into a PHP object. Pass the arraycollection as one param. On the PHP side you would use it as:
function myfunction( $Object_param )
{
foreach( $Object_param as $Object )
{
echo $Object[ 'id' ];
echo $Object[ 'nome' ];
}
}
等等。
这篇关于Flex的Datagrid中选择多行并发送到AMFPHP后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!