Total que quise usar un loop para llenar el combobox de los clientes (esto en PHP) y ya solo mandar llamar la información parceada de PHP usando el dataProvider del combobox y ya poder ver la informacion de mi tabla de clientes... pero al cargarla no se ve nada... no se si tenga que ver porque es dentro del modulo donde estoy cargando el httpService...
mi codigo se ve de la siguiente manera:
inventarios.mxml
Código Flex :
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300">
<mx:HTTPService id="clients" resultFormat="e4x" method="POST" url="php/reportes/index.php" useProxy="false"/>
<mx:Panel headerHeight="7" title="Ver inventario" color="0x000000">
<mx:Label text="Bodega"/>
<mx:ComboBox id="donde">
<mx:ArrayCollection>
<mx:String>Bodega</mx:String>
<mx:String>Patio</mx:String>
<mx:String>Vias</mx:String>
<mx:String>Transferencia</mx:String>
<mx:String>Transito</mx:String>
</mx:ArrayCollection>
</mx:ComboBox>
<mx:Label text="Cliente"/>
<mx:ComboBox id="quien" dataProvider="{clients.lastResult.clientes.cliente}" />
</mx:Panel>
</mx:Module>
reportes.mxml
Código Flex :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="0x424242">
<mx:Style>
.panelSize{font-size:20; text-align:right; color:#660000; font-style:normal;}
</mx:Style>
<mx:Panel id="ing" titleStyleName="panelSize" title="CONTINUOUS LINE OF SERVICES"
headerHeight="70" height="90%" width="90%" horizontalCenter="0" layout="absolute"
verticalCenter="0" titleIcon="@Embed('images/logo.gif')" borderColor="0xFEFEFE">
<mx:HBox left="10">
<mx:Label text="Reportes" fontSize="25"/>
<mx:ModuleLoader url="reportes/inventarios.swf"/>
</mx:HBox>
<mx:VBox right="20">
<mx:Label text="Reportes" fontSize="15" fontStyle="italic" fontWeight="bold" color="0x880000"/>
<mx:ComboBox id="reports">
<mx:ArrayCollection>
<mx:String id="inv">Inventarios</mx:String>
<mx:String id="ord">Ordenes</mx:String>
<mx:String id="es">Entradas/Salidas</mx:String>
<mx:String id="rem">Remisiones</mx:String>
<mx:String id="mer">Mermas</mx:String>
<mx:String id="car">Cargas</mx:String>
<mx:String id="act">Actividades</mx:String>
</mx:ArrayCollection>
</mx:ComboBox>
<mx:Label text="Graficos" fontSize="15" fontStyle="italic" fontWeight="bold" color="0x880000"/>
<mx:ComboBox id="graficos">
<mx:ArrayCollection>
<mx:String id="epc">Entradas por cliente</mx:String>
<mx:String id="eg">Entradas Generales</mx:String>
<mx:String id="spc">Salidas por cliente</mx:String>
<mx:String id="sg">Salidas Generales</mx:String>
</mx:ArrayCollection>
</mx:ComboBox>
</mx:VBox>
</mx:Panel>
</mx:Application>
y mi codigo index.php
Código PHP :
<?
include('../funciones/login_validate.php'); // Validar que esté logueado
include('../funciones/rights_functions.php'); // Areas de acceso
include('../funciones/dbcon.php'); // Conexion a la base de datos
include('../funciones/comunes.php'); // Herramientas
include('../config.php');
$query = "Select id, name from clients ORDER BY name ASC";
$res1 = mysql_query($query,$conexion);
echo "<clientes>";
while($client = mysql_fetch_assoc($res1)) {
echo "<cliente id='".$client['id']."'>".$client['name']."</cliente>";
}
echo "</clientes>";
?>
Si alguien me pudiera decir que puedo hacer o cambiar para que funcione se los agradeceria bastante, porque lo unico que he encontrado en la red es sobre como poner los datos dentro de un dataGrid pero no se parece casi nada el codigo... y el que encontre de un combobox me esta casi identico y aun asi no funciona el mio....
