Foros del Web » Creando para Internet » Flash y Actionscript »

Colocar Datos en un TreeData a partir de un HTTPSERVICE???

Estas en el tema de Colocar Datos en un TreeData a partir de un HTTPSERVICE??? en el foro de Flash y Actionscript en Foros del Web. Buen dia! espero puedan ayudarme... quiero crear una lista en un Tree de Flex 3 pero no me carga correctamente los datos que vienen del ...
  #1 (permalink)  
Antiguo 05/07/2010, 12:01
Avatar de superscully  
Fecha de Ingreso: febrero-2009
Mensajes: 56
Antigüedad: 15 años, 2 meses
Puntos: 0
Pregunta Colocar Datos en un TreeData a partir de un HTTPSERVICE???

Buen dia!

espero puedan ayudarme... quiero crear una lista en un Tree de Flex 3 pero no me carga correctamente los datos que vienen del HTTPService...

Código:
<mx:HTTPService id="phpInfo" method="POST" url="http://localhost/xml/news.php"  resultFormat="e4x" showBusyCursor="true"/>
...este genera un xml...

al querer mostrarlo en el Tree me aparece...
Código:
<mx:Tree id="tree" width="100%" height="90%" dataProvider="{phpInfo.lastResult.news}"
			        labelField="@label" selectable="true" change="onChangeTree(event);" color="#0B333C"/>
Cita:
warning: unable to bind to property 'news' on class 'XML' (class is not an IEventDispatcher)
espero me puedan ayudar... saludos! y gracias por su tiempo...
  #2 (permalink)  
Antiguo 05/07/2010, 21:24
Avatar de superscully  
Fecha de Ingreso: febrero-2009
Mensajes: 56
Antigüedad: 15 años, 2 meses
Puntos: 0
Respuesta: Colocar Datos en un TreeData a partir de un HTTPSERVICE???

Buenas noches!

ya he encontrado la solucion... coloque el siguiente codigo...

Código:
<mx:HTTPService id="phpInfo" method="POST" url="http://localhost/xml/news.php" result="newsInHandler(event)" resultFormat="e4x" showBusyCursor="true"/>

[Bindable]
		private var NEWXML:XMLListCollection=new XMLListCollection;
		
		private function newsInHandler(event:ResultEvent):void
		{
			var tmpXML:XMLList=new XMLList(event.result);
			NEWXML= new XMLListCollection(tmpXML..categoryid);
		}

Etiquetas: flex, httpservices, tree
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:59.