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
Tue May 11, 2010 2:41 pm by anjum

» steam boiler efficency calculator
Wed Dec 23, 2009 4:55 am by imranmalik

» URLLoader and URLRequest application
Tue Dec 15, 2009 6:01 pm by imranmalik

» Time display by ILOG ELIXIER PACKAGE
Thu Dec 10, 2009 9:28 am by imranmalik

» how Filter XML data by Flash Builder
Sat Dec 05, 2009 6:33 pm by imranmalik

» drag and drop (Advance Data Grid to List Box)
Thu Nov 19, 2009 7:12 pm by imranmalik

» access the xml file through HTTPService request
Sun Nov 15, 2009 11:46 am by imranmalik

» CURRENCY VALIDATOR
Tue Nov 03, 2009 2:06 pm by imranmalik

» Synchronous Behavior
Sun Nov 01, 2009 8:04 pm by imranmalik

Social bookmarking
Social bookmarking Digg  Social bookmarking Delicious  Social bookmarking Reddit  Social bookmarking Stumbleupon  Social bookmarking Slashdot  Social bookmarking Yahoo  Social bookmarking Google  Social bookmarking Blinklist  Social bookmarking Blogmarks  Social bookmarking Technorati  

Bookmark and share the address of on your social bookmarking website


You are not connected. Please login or register

Easy flex XML serialization/deserialization

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Easy flex XML serialization/deserialization on Wed Oct 28, 2009 10:04 pm

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)

View user profile
Smile very nice post thanks to share it

View user profile http://flexpakistan.forumotion.com/
how to use the event dispatching from parent to child or child to parent window

View user profile http://www.jumusic.tv
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

View user profile http://flexpakistan.forumotion.com/
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.

View user profile http://flexpakistan.forumotion.com/

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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