getRuntimeType example

44 views
Skip to first unread message

hidalgo

unread,
Jul 15, 2011, 3:24:23 AM7/15/11
to FxWorks
Hi,
It would be really helpful if there is an example to using the
getRunTimeType. My scenario is pretty simple I have a field that needs
to be serialized and its typed as an Interface. The Serialization
works perfectly for all the concrete types.Its the deserialization
thats a problem. How do I map the interface to all the possible
concrete classes? any help or a nudge in the correct direction will be
much appreciated.

thanks,
Vijay

Alexutz

unread,
Jul 15, 2011, 5:04:42 AM7/15/11
to FxWorks
Hello Vijay,

GetRuntimeType flag is used in XmlElement and XmlArray annotations
and, if set to true, instructs the engine to inspect the xml received
and based on it to determine the type of object to be instanciated. To
do that you can bind to three elements:
* XsiType - you can use the xsi:type attribute from the XSD notation
on the tag in question. If you set
configuration.getResponseTypeByXsiType to true, the engine will
attempt to detect the type attribute in the xml
* Tag name - the engine will inspect the tag name of the xml and use
it to determine which type to instanciate. The tag name is actually
the alias you set in the XmlClass meta.
* Tag namespace - as you know, one can set namespaces on classes and
the engine can use these namespaces to determine again which class to
use.

Make sure you have all classes registered with the engine for the last
two points with processTypes(... args) : void; method in IFlexXB
engine instance.

In your case, you may most likely want to use the latter two options
and set the alias and/or namespace on yor classes which implement that
interface. Don't forget to set the GetRuntimeType flag to true when
using fields of the interface type within your other objects.

Let me know how it works for you.

Good luck,
Alex

Vijay shan

unread,
Jul 15, 2011, 10:26:03 AM7/15/11
to fle...@googlegroups.com
Hey Alex,
  Thank you very much for taking the time to explain. I tried to go off an alias. What I did was on the field annotation I set getRunTimeType = true and tried to see if the deserialization would work. when it serialized it just used my field name as the node name and did not take my classes alias. I think that is the major problem. Any alias I set has to be on the concrete class and not in the field typed to the interface. Please correct me If I am wrong. I have a brief example below. Thanks for your time and patience.

Vijay

//Start code/////

//Main class being serialized
package com.clutch.flexbb.vo {
    import mx.collections.ArrayCollection;
    import mx.collections.ArrayList;

    [XmlClass(alias="TestVO")]
    public class testVO {
        [XmlElement(getRunTimeType="true")]
        public var intTest:ITest;

        [XmlElement(getRunTimeType="true")]
        public var intTest1:ITest;

        public function testVO() {

        }
    }
}

//interface
package com.clutch.flexbb.vo {

    public interface ITest {
        function getData():void;
        function setData():void;
    }
}

//Concrete class 1
package com.clutch.flexbb.vo {
    [XmlClass(alias="testVO6")]
    public class testVO6 implements ITest {

        [XmlAttribute]
        public var test6Inst:String="test6";

        public function testVO6() {


        }

        public function getData():void {
        }

        public function setData():void {
        }
    }
}

//concrete class 2
package com.clutch.flexbb.vo {
    [XmlClass(alias="testVO7")]
    public class testVO7 implements ITest {
        [XmlAttribute]
        public var test7Inst:String = "test7";

        public function testVO7() {

        }

        public function getData():void {
        }

        public function setData():void {
        }
    }
}
 
//XML output
<TestVO>
  <intTest1 test7Inst="test7"/>
  <intTest test6Inst="test6"/>
</TestVO>

//Expected output
<TestVO>
  <testVO6 test7Inst="test7"/>
  <testVO7  test6Inst="test6"/>
</TestVO>

//End Code




--
You received this message because you are subscribed to the Google Groups "FxWorks" group.
To post to this group, send email to fle...@googlegroups.com.
To unsubscribe from this group, send email to flexxb+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flexxb?hl=en.


Alexutz

unread,
Jul 15, 2011, 10:38:13 AM7/15/11
to FxWorks
Set the alias of those fields to "*". This will make the engine to
serialize those elements by useing the alias specified in the classes
rather than by the fields themselves.

On Jul 15, 5:26 pm, Vijay shan <vijays...@gmail.com> wrote:
> Hey Alex,
>   Thank you very much for taking the time to explain. I tried to go off an
> alias. What I did was on the field annotation I set getRunTimeType = true
> and tried to see if the deserialization would work. when it serialized it
> just used my field name as the node name and did not take my classes alias.
> I think that is the major problem. Any alias I set has to be on the concrete
> class and not in the field typed to the interface. Please correct me If I am
> wrong. I have a brief example below. Thanks for your time and patience.
>
> Vijay
>
> *//Start code/////*
>
> *//Main class being serialized*
> package com.clutch.flexbb.vo {
>     import mx.collections.ArrayCollection;
>     import mx.collections.ArrayList;
>
>     [XmlClass(alias="TestVO")]
>     public class testVO {
>         [XmlElement(getRunTimeType="true")]
>         public var intTest:ITest;
>
>         [XmlElement(getRunTimeType="true")]
>         public var intTest1:ITest;
>
>         public function testVO() {
>
>         }
>     }
>
> }
>
> *//interface*
> package com.clutch.flexbb.vo {
>
>     public interface ITest {
>         function getData():void;
>         function setData():void;
>     }
>
> }
>
> *//Concrete class 1*
> package com.clutch.flexbb.vo {
>     [XmlClass(alias="testVO6")]
>     public class testVO6 implements ITest {
>
>         [XmlAttribute]
>         public var test6Inst:String="test6";
>
>         public function testVO6() {
>
>         }
>
>         public function getData():void {
>         }
>
>         public function setData():void {
>         }
>     }
>
> }
>
> *//concrete class 2*
> package com.clutch.flexbb.vo {
>     [XmlClass(alias="testVO7")]
>     public class testVO7 implements ITest {
>         [XmlAttribute]
>         public var test7Inst:String = "test7";
>
>         public function testVO7() {
>
>         }
>
>         public function getData():void {
>         }
>
>         public function setData():void {
>         }
>     }
>
> }
>
> //*XML output*
> >http://groups.google.com/group/flexxb?hl=en.- Hide quoted text -
>
> - Show quoted text -

Vijay shan

unread,
Jul 15, 2011, 10:47:15 AM7/15/11
to fle...@googlegroups.com

I tried that and now the XML looks like this :

<TestVO>
  <testVO7 test7Inst="test7"/>
  <testVO6 test6Inst="test6"/>
</TestVO>

When i try to deserialize it errors out with the following output

[Fault] exception, information=TypeError: Error #1010: A term is undefined and has no properties.
at com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObject()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\serializer\XmlElementSerializer.as:98]
at XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
at com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.as:274]
at FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\FlexXBCore.as:111]
at FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\src\FlexBB_tests.mxml:43]
at FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\FlexBB_tests\src\FlexBB_tests.mxml:97]

Thanks,
Vijay

hidalgo

unread,
Jul 15, 2011, 11:13:37 AM7/15/11
to FxWorks
Do I have to provide a context mapping of some kind. Because the code
fails when it tries to look up my interface in the context.

Thanks,
Vijay

On Jul 15, 10:47 am, Vijay shan <vijays...@gmail.com> wrote:
> I tried that and now the XML looks like this :
>
> <TestVO>
>   <testVO7 test7Inst="test7"/>
>   <testVO6 test6Inst="test6"/>
> </TestVO>
>
> When i try to deserialize it errors out with the following output
>
> [Fault] exception, information=TypeError: Error #1010: A term is undefined
> and has no properties.
> at XML/http://adobe.com/AS3/2006/builtin::child()
> at
> com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObjec t()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\seri alizer\XmlElementSerializer.as:98]
> at
> XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\ com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
> at
> com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB \src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.as:2 74]
> at
> FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googl ecode\flexxb\core\FlexXBCore.as:111]
> at
> FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\ src\FlexBB_tests.mxml:43]
> at
> FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\Flex BB_tests\src\FlexBB_tests.mxml:97]
> > > >http://groups.google.com/group/flexxb?hl=en.-Hide quoted text -

Alexutz

unread,
Jul 15, 2011, 5:42:41 PM7/15/11
to FxWorks
Hmmm... well we've just reached one of FlexXB's limitations. FlexXB
will not be able to properly deserialize the field because it desn't
know which field name we need to take into account since the name is
based on the value's type. ON serialize everything is fine. However on
deserialize, it doesn't know where to take the xml name from since it
has no fixed alias nor a fixed type.
What you can do is use virtual paths to have a well known element
wrapping your xml value:

[XmlClass(alias="TestVO")]
public class testVO {
[XmlElement(alias="intTest/*",getRunTimeType="true")]
public var intTest:ITest;


[XmlElement(alias="intTest1/*",getRunTimeType="true")]
public var intTest1:ITest;


public function testVO() {


}
}


The xml will look different but now the deserialization will work
properly because the engine knows where to look for the value
regardless of its type.

your xml will look like:

<TestVO>
<intTest>
<testVO6 test7Inst="test7"/>
</intTest>
<intTest1>
<testVO7 test6Inst="test6"/>
</intTest1>
</TestVO>

If this is not how your xml should look like then I'm sorry to say
that there is no way to fix this automatically and you should try the
manual way by implementing the ISerializable interface to add you type
detection and dispatching logic.
> > > > >http://groups.google.com/group/flexxb?hl=en.-Hidequoted text -
>
> > > > - Show quoted text -
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "FxWorks" group.
> > > To post to this group, send email to fle...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > flexxb+un...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/flexxb?hl=en.- Ascundeţi textul citat -
>
> - Afişare text în citat -

Vijay shan

unread,
Jul 16, 2011, 5:17:01 PM7/16/11
to fle...@googlegroups.com
Alex,
  I tried your fix. Now My error looks like this

[trace] XmlElementSerializer INFO - Deserializing element <<null>> to field intTest

[Fault] exception, information=TypeError: Error #1010: A term is undefined and has no properties.
at XML/http://adobe.com/AS3/2006/builtin::child()
at com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObject()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\serializer\XmlElementSerializer.as:98]

at XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
at com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.as:274]
at FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\FlexXBCore.as:111]
at FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\src\FlexBB_tests.mxml:45]
at FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\FlexBB_tests\src\FlexBB_tests.mxml:99]

Please let me know if there is anything else I should do that I am missing.

thanks,
Vijay

2011/7/15 Alexutz <alex.id...@gmail.com>

Vijay shan

unread,
Jul 17, 2011, 12:51:50 PM7/17/11
to fle...@googlegroups.com
Alex I have a simple flex project that might be off help would you like me to zip my code?

thanks,
Vijay

2011/7/16 Vijay shan <vija...@gmail.com>

Alexutz

unread,
Jul 17, 2011, 5:18:14 PM7/17/11
to FxWorks
It's ok, I was able to reproduce this. I'm trying to find a solution
for it... it's a bug :(

On 17 iul., 19:51, Vijay shan <vijays...@gmail.com> wrote:
> Alex I have a simple flex project that might be off help would you like me
> to zip my code?...
>
> citiţi mai multe >>
>
> thanks,
> Vijay
>
> 2011/7/16 Vijay shan <vijays...@gmail.com>
>
>
>
> > Alex,
> > I tried your fix. Now My error looks like this
>
> > [trace] XmlElementSerializer INFO - Deserializing element <<null>> to field
> > intTest
>
> > [Fault] exception, information=TypeError: Error #1010: A term is undefined
> > and has no properties.
> > at XML/http://adobe.com/AS3/2006/builtin::child()
> > at
> > com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObjec-t()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\seri-alizer\XmlElementSerializer.as:98]
>
> > at
> > XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\-com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
> > at
> > com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB-\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.as:2-74]
> > at
> > FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googl-ecode\flexxb\core\FlexXBCore.as:111]
> > at
> > FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\-src\FlexBB_tests.mxml:45]
> > at
> > FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\Flex-BB_tests\src\FlexBB_tests.mxml:99]
>
> > Please let me know if there is anything else I should do that I am missing.
>
> > thanks,
> > Vijay
>
> > 2011/7/15 Alexutz <alex.id.ciob...@gmail.com>
> >> > > > > > > getRunTimeType. My scenario is- Ascundeţi textul citat -

Vijay shan

unread,
Jul 17, 2011, 5:31:53 PM7/17/11
to fle...@googlegroups.com
Thanks Alex, let me know if i can help in any way

Vijay

Vijay shan

unread,
Jul 17, 2011, 7:51:42 PM7/17/11
to fle...@googlegroups.com
Just a quick check before i implement custom serializers on everything
with interfaces. Can i revert back to a previous version. Will that
help?

Thanks
Vijay

Vijay shan

unread,
Jul 18, 2011, 1:37:00 PM7/18/11
to fle...@googlegroups.com
Any luck Alex? Is there anything that I could do to help? 

thanks,
Vijay

2011/7/17 Vijay shan <vija...@gmail.com>

Alexutz

unread,
Jul 19, 2011, 4:48:14 AM7/19/11
to FxWorks
YEssss!! Managed to fix it. You should see it on svn.

Alex

On 18 iul., 20:37, Vijay shan <vijays...@gmail.com> wrote:
> Any luck Alex? Is there anything that I could do to help?...
>
> citiţi mai multe >>
>
> thanks,
> Vijay
>
> 2011/7/17 Vijay shan <vijays...@gmail.com>
>
>
>
> > Just a quick check before i implement custom serializers on everything
> > with interfaces. Can i revert back to a previous version. Will that
> > help?
>
> > Thanks
> > Vijay
>
> > On 7/17/11, Vijay shan <vijays...@gmail.com> wrote:
> > > Thanks Alex, let me know if i can help in any way
>
> > > Vijay
>
> > > On 7/17/11, Alexutz <alex.id.ciob...@gmail.com> wrote:
> > >> It's ok, I was able to reproduce this. I'm trying to find a solution
> > >> for it... it's a bug :(
>
> > >> On 17 iul., 19:51, Vijay shan <vijays...@gmail.com> wrote:
> > >>> Alex I have a simple flex project that might be off help would you like
> > >>> me
> > >>> to zip my code?...
>
> > >>> citiţi mai multe >>
>
> > >>> thanks,
> > >>> Vijay
>
> > >>> 2011/7/16 Vijay shan <vijays...@gmail.com>
>
> > >>> > Alex,
> > >>> > I tried your fix. Now My error looks like this
>
> > >>> > [trace] XmlElementSerializer INFO - Deserializing element <<null>> to
> > >>> > field
> > >>> > intTest
>
> > >>> > [Fault] exception, information=TypeError: Error #1010: A term is
> > >>> > undefined
> > >>> > and has no properties.
> > >>> > at XML/http://adobe.com/AS3/2006/builtin::child()
> > >>> > at
>
> > com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObjec--t()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\ser-i-alizer\XmlElementSerializer.as:98]
>
> > >>> > at
>
> > XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\--com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
> > >>> > at
>
> > com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB--\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.as:-2-74]
> > >>> > at
>
> > FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googl--ecode\flexxb\core\FlexXBCore.as:111]
> > >>> > at
>
> > FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\--src\FlexBB_tests.mxml:45]
> > >>> > at
>
> > FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\Flex--BB_tests\src\FlexBB_tests.mxml:99]
> > >>> >> > > > > <testVO6 test7Inst="test7"/>- Ascundeţi textul citat -

Vijay shan

unread,
Jul 19, 2011, 4:57:35 AM7/19/11
to fle...@googlegroups.com
Thanks Alex going to try it out now will let you know soon.

Vijay

2011/7/19 Alexutz <alex.id...@gmail.com>

Vijay shan

unread,
Jul 19, 2011, 6:21:39 AM7/19/11
to fle...@googlegroups.com
Alex I am running into the same issue still. I tried putting a break point at the start of the deserializeObject method. now my alias="*" and getRuntimetype=false even though on serialize it obeyed it correctly.

thanks,
Vijay 

2011/7/19 Vijay shan <vija...@gmail.com>

Vijay shan

unread,
Jul 19, 2011, 6:51:30 AM7/19/11
to fle...@googlegroups.com
Some more info on this, As I stepped into the code more, the descriptor cache for the base class does not have the right annotations stored. when it looks it up again it seems to have reset alias to "*" and getRunTimeType to false. Am i missing something here?

Alexutz

unread,
Jul 19, 2011, 7:23:11 AM7/19/11
to FxWorks
Hmmm, well, I tried on your model classes and it worked without a
hitch.
And getRunTimeType is actually getRuntimeType.
Can you send me a sample that does not work with the changes I
operated on FlexXB?

On 19 iul., 13:51, Vijay shan <vijays...@gmail.com> wrote:
> Some more info on this, As I stepped into the code more, the descriptor
> cache for the base class does not have the right annotations stored. when it
> looks it up again it seems to have reset alias to "*" and getRunTimeType to
> false. Am i missing something here?...
>
> citiţi mai multe >>
>
> thanks,
> Vijay
>
> 2011/7/19 Vijay shan <vijays...@gmail.com>
>
>
>
> > Alex I am running into the same issue still. I tried putting a break point
> > at the start of the deserializeObject method. now my alias="*" and
> > getRuntimetype=false even though on serialize it obeyed it correctly.
>
> > thanks,
> > Vijay
>
> > 2011/7/19 Vijay shan <vijays...@gmail.com>
>
> >> Thanks Alex going to try it out now will let you know soon.
>
> >> Vijay
>
> >> 2011/7/19 Alexutz <alex.id.ciob...@gmail.com>
> >>> com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObjec---t()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\se-r-i-alizer\XmlElementSerializer.as:98]
>
> >>> > > >>> > at
>
> >>> XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\---com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
> >>> > > >>> > at
>
> >>> com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB---\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.as-:-2-74]
> >>> > > >>> > at
>
> >>> FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googl---ecode\flexxb\core\FlexXBCore.as:111]
> >>> > > >>> > at
>
> >>> FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\---src\FlexBB_tests.mxml:45]
> >>> > > >>> > at
>
> >>> FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\Flex---BB_tests\src\FlexBB_tests.mxml:99]
> >>> > > >>> >> > > > > public var intTest:ITest;- Ascundeţi textul citat -

Vijay shan

unread,
Jul 19, 2011, 7:26:53 AM7/19/11
to fle...@googlegroups.com
Please find attached my very simple example. I was compiling against the trunk of FlexXB. Thanks once again for your help.

Vijay

FlexBB_tests.zip

Vijay shan

unread,
Jul 19, 2011, 7:42:14 AM7/19/11
to fle...@googlegroups.com
Please disregard my earlier comments. there were typos in my code, everything is working fine.

Vijay

2011/7/19 Vijay shan <vija...@gmail.com>
Please find attached my very simple example. I was compiling against the trunk of FlexXB. Thanks once again for your help.

Alexutz

unread,
Jul 19, 2011, 7:45:22 AM7/19/11
to FxWorks
Your getRunTimeType attribute is misspelled. It should be
getRuntimeType.
You should have metadata assistance via the flashbuilder when you add
FlexXB in libs.

On 19 iul., 14:26, Vijay shan <vijays...@gmail.com> wrote:
> Please find attached my very simple example. I was compiling against the
> trunk of FlexXB. Thanks once again for your help....
>
> citiţi mai multe >>
>
> FlexBB_tests.zip
> 270KVizualizaţiDescărcaţi
> > com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObjec----t()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\s-e-r-i-alizer\XmlElementSerializer.as:98]
>
> > > >>> > > >>> > at
>
> > XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\----com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
> > > >>> > > >>> > at
>
> > com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB----\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.a-s-:-2-74]
> > > >>> > > >>> > at
>
> > FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googl----ecode\flexxb\core\FlexXBCore.as:111]
> > > >>> > > >>> > at
>
> > FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\----src\FlexBB_tests.mxml:45]
> > > >>> > > >>> > at
>
> > FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\Flex----BB_tests\src\FlexBB_tests.mxml:99]
> > > >>> > > >>> >> > > > > just used my field- Ascundeţi textul citat -

Vijay shan

unread,
Jul 19, 2011, 7:47:43 AM7/19/11
to fle...@googlegroups.com
Do you have any suggestion for getting the metadata to work in intellij.

Thanks,
Vijay

2011/7/19 Alexutz <alex.id...@gmail.com>

Alexutz

unread,
Jul 19, 2011, 2:13:01 PM7/19/11
to FxWorks
Sorry, no clue. Try and find forum discussions about this. I'm sure
people must have had this need at some point.

On 19 iul., 14:47, Vijay shan <vijays...@gmail.com> wrote:
> Do you have any suggestion for getting the metadata to work in intellij....
>
> citiţi mai multe >>
>
> Thanks,
> Vijay
>
> 2011/7/19 Alexutz <alex.id.ciob...@gmail.com>
> > com.googlecode.flexxb.xml.serializer::XmlElementSerializer/deserializeObjec-----t()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googlecode\flexxb\xml\-s-e-r-i-alizer\XmlElementSerializer.as:98]
>
> > > > > >>> > > >>> > at
>
> > XmlMemberSerializer/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\-----com\googlecode\flexxb\xml\serializer\XmlMemberSerializer.as:106]
> > > > > >>> > > >>> > at
>
> > com.googlecode.flexxb.core::SerializationCore/deserialize()[C:\tools\FlexXB-----\src\FlexXB\src\main\flex\com\googlecode\flexxb\core\SerializationCore.-a-s-:-2-74]
> > > > > >>> > > >>> > at
>
> > FlexXBCore/deserialize()[C:\tools\FlexXB\src\FlexXB\src\main\flex\com\googl-----ecode\flexxb\core\FlexXBCore.as:111]
> > > > > >>> > > >>> > at
>
> > FlexBB_tests/button2_clickHandler()[C:\code\Sprint_2.1_branch\FlexBB_tests\-----src\FlexBB_tests.mxml:45]
> > > > > >>> > > >>> > at
>
> > FlexBB_tests/___FlexBB_tests_Button2_click()[C:\code\Sprint_2.1_branch\Flex-----BB_tests\src\FlexBB_tests.mxml:99]
> > > > > >>> > > >>> >> BB_tests\src\FlexBB_tests.mxml:97]- Ascundeţi textul citat -

Vijay shan

unread,
Jul 19, 2011, 4:15:07 PM7/19/11
to fle...@googlegroups.com
Np. thank you for your help.

Vijay

2011/7/19 Alexutz <alex.id...@gmail.com>

battarsa

unread,
May 11, 2012, 11:34:22 AM5/11/12
to fle...@googlegroups.com
Hi have a similar problem with XMLArray.

In my class there is an Array than can contain different object types.

If I use this code:

[XmlArray(getRuntimeType="true")]
public var elements:Array;

it works, but an extra <elements> tag is in the xml.

If I use this code:

[XmlArray(alias="*", getRuntimeType="true")]
public var elements:Array;

The output XML is ok, but the deserialization doesn't work.
Reply all
Reply to author
Forward
0 new messages