Ver Mensaje Individual
Antiguo 27-mar-2008, 13:06   #1 (permalink)
Sergestux
Sergestux no se puede cailificar en este momento
 
Avatar de Sergestux
 
Fecha de Ingreso: agosto-2007
Ubicación: Tijuas
Mensajes: 429
Enviar un mensaje por Yahoo  a Sergestux
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
__________________
You'll be free, hackers, you'll be free

Última edición por Sergestux; 27-mar-2008 a las 13:15. Razón: Agregue la imagen
Sergestux está desconectado   Responder Citando