Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/03/2008, 13:06
Avatar de Sergestux
Sergestux
 
Fecha de Ingreso: agosto-2007
Ubicación: Tapachula
Mensajes: 1.218
Antigüedad: 16 años, 8 meses
Puntos: 20
Duda con resultFormat del objeto HTTPService

Hola veran la situacion es que estoy haciendo pruebas para lo cual tengo el sig. archivo xml
Código:
<Platillos>
    <Platillo id="1" descripcion="Platillo Uno Texto de varias lineas">Platote 1</Platillo>
    <Platillo id="2" descripcion="Platillo Dos Texto de varias lineas">Platote 2</Platillo>
    <Platillo id="3" descripcion="Platillo Tres Texto de varias lineas">Platote 3</Platillo>
</Platillos>
Y mi archivo mxml es el sig.
Código:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
        creationComplete="questions.send(); questions2.send();">
<mx:HTTPService id="questions" url="http://localhost/Platillos.xml" showBusyCursor="true" resultFormat="e4x"/>    
<mx:HTTPService id="questions2" url="http://localhost/Platillos.xml" showBusyCursor="true" resultFormat="object"/>
    <mx:Tile width="256" height="104">
            <mx:Repeater id="questionList" dataProvider="{questions.lastResult.Platillo}">
            <mx:Text text="{questionList.currentItem.@descripcion}" width="84"
             textDecoration="underline"    
                />
            <mx:Button label="{questionList.currentItem.@id}" width="119"/>
            <mx:Button label="{questionList.currentItem}" width="119"/>
            </mx:Repeater>            
    </mx:Tile>
    <mx:DataGrid x="297" y="28" dataProvider="{questions2.lastResult.Platillos.Platillo}">
        <mx:columns>
            <mx:DataGridColumn headerText="Id" dataField="id"/>
            <mx:DataGridColumn headerText="Platillo" dataField="descripcion"/>
        </mx:columns>
    </mx:DataGrid>
</mx:Application>
Como podran observar lo que deseo es usar el mismo objeto (archivo xml) HTTPService en los dos casos, es decir en el data grid y en los repeater que tengo, para esto tuve que referenciar al mismo archivo pero en dos objetos diferentes solamente cambiandole la propiedad result.

Mi duda es sobre si puedo usar un solo objeto HTTPService para los dos casos o tendre que quedarme con este metodo.

Esta es la salida hasta el momento http://bp2.blogger.com/_8FSqsDcCA-Y/...TTPService.GIF

Gracias por cualquier ayuda que puedan proporcionarme

Última edición por Sergestux; 27/03/2008 a las 13:15 Razón: Agregue la imagen