Would you like to react to this message? Create an account in a few clicks or log in to continue.


Pakistan is contributing at its best in the field of latest technologies, platforms and approaches. Here,Flex developers share their experience, knowledge and ideas to assure their best talent in the world.

Latest topics
» Advice sought on recruiting a Senior Flex developer in Lahore
Easy flex XML serialization/deserialization EmptyTue May 11, 2010 2:41 pm by anjum

» steam boiler efficency calculator
Easy flex XML serialization/deserialization EmptyWed Dec 23, 2009 4:55 am by imranmalik

» URLLoader and URLRequest application
Easy flex XML serialization/deserialization EmptyTue Dec 15, 2009 6:01 pm by imranmalik

» Time display by ILOG ELIXIER PACKAGE
Easy flex XML serialization/deserialization EmptyThu Dec 10, 2009 9:28 am by imranmalik

» how Filter XML data by Flash Builder
Easy flex XML serialization/deserialization EmptySat Dec 05, 2009 6:33 pm by imranmalik

» drag and drop (Advance Data Grid to List Box)
Easy flex XML serialization/deserialization EmptyThu Nov 19, 2009 7:12 pm by imranmalik

» access the xml file through HTTPService request
Easy flex XML serialization/deserialization EmptySun Nov 15, 2009 11:46 am by imranmalik

» CURRENCY VALIDATOR
Easy flex XML serialization/deserialization EmptyTue Nov 03, 2009 2:06 pm by imranmalik

» Synchronous Behavior
Easy flex XML serialization/deserialization EmptySun Nov 01, 2009 8:04 pm by imranmalik

Social bookmarking
Social bookmarking reddit      

Bookmark and share the address of on your social bookmarking website


You are not connected. Please login or register

Easy flex XML serialization/deserialization

3 posters

Go down  Message [Page 1 of 1]

defenderkhalil



Converting and object to XML in action script and then parsing XML back to populate the objects / value objects in flex is not an easy task it requires much time and effort and parsing XML in flex frame work is very slow as compared to java, which use the SAX and DOM parsers to parse XML file efficiently.

google code provides the open source solution to convert Value object to XML and vice versa

For complete information and download the liberary please visit the following link

http://code.google.com/p/flexmler/

Regards
Asim Khalil
Enjoy flex (Y)

anjum

anjum

Smile very nice post thanks to share it

https://flexpakistan.board-directory.net/

imranmalik



how to use the event dispatching from parent to child or child to parent window

http://www.jumusic.tv

anjum

anjum

there are two ways of communicating between components.

1)Metadata Events
2)Custom Events

1) Metadata Event
<mx:Metadata>
[ Event(name="mouseClickEvent", type="flash.events.Event") ]
</mx:Metadata>
2) Custom Events
import flash.events.Event;

import mx.controls.*;
public class CustomEvent extends Event
{

public function CustomEvent()
{
super();

}

override public function clone():Event
{
return new CustomEvent();
}
}
im working a sample application which will demostrate the component communication.
i hope that will be helpful for u.

regards,
anjum

https://flexpakistan.board-directory.net/

anjum

anjum

Child1Component.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="114" layout="absolute" title="Component 1">

<mx:Script>
<![CDATA[
protected function checkbox1_changeHandler(event:Event):void
{
if(chkShowHode.selected)
{
dispatchEvent(new Event("ShowClickEvent",true));
}else
{
dispatchEvent(new Event("ShowClickEvent",false));
}
}
]]>
</mx:Script>

<mx:CheckBox x="20" y="20" label="Show/Hide component 2" change="checkbox1_changeHandler(event)" id="chkShowHode"/>
<mx:Metadata>
[ Event(name="ShowClickEvent", type="flash.events.Event") ]
</mx:Metadata>
</mx:Panel>
//------------------------------------------
ChildComponent2.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="108" title="Component 2" layout="absolute">
<mx:Script>
<![CDATA[
protected function checkbox1_changeHandler(event:Event):void
{
if(chkShowHode.selected)
{
dispatchEvent(new Event("ShowClickEvent",true));
}else
{
dispatchEvent(new Event("ShowClickEvent",false));
}
}
]]>
</mx:Script>

<mx:CheckBox x="20" y="20" label="Show/Hide component 1" change="checkbox1_changeHandler(event)" id="chkShowHode"/>
<mx:Metadata>
[ Event(name="ShowClickEvent", type="flash.events.Event") ]
</mx:Metadata>

</mx:Panel>
//------------------------------------------
ParentComponent.mxml

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" width="590" height="380" layout="absolute" title="Parent" xmlns:views="com.flexpakistan.views.*">

<mx:Script>
<![CDATA[
protected function childcomponent1_ShowClickEventHandler(event:Event):void
{
if(event.bubbles == true)
{
comp2.visible = true;
}else
{
comp2.visible = false;
}
}

protected function comp2_ShowClickEventHandler(event:Event):void
{
if(event.bubbles == true)
{
comp1.visible = true;
}else
{
comp1.visible = false;
}
}

]]>
</mx:Script>

<views:ChildComponent x="10" y="25" ShowClickEvent="childcomponent1_ShowClickEventHandler(event)" id="comp1">
</views:ChildComponent>
<views:ChildComponent2 x="10" y="170" id="comp2" visible="false" ShowClickEvent="comp2_ShowClickEventHandler(event)">
</views:ChildComponent2>

</mx:Panel>

please feel free if u have any question to ask.

https://flexpakistan.board-directory.net/

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum