You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by "romanisitua@yahoo.com" <ro...@yahoo.com> on 2021/06/24 21:49:48 UTC
Re: users Digest 24 Jun 2021 21:31:33 -0000 Issue 1730
I have attached the source files for StringType and ShortType both the as3 and java equivalents
Note: The java version of StringType and ShortType extend AbstractType
AbstractType is defined as follows
public abstract class AbstractType<T> implements Serializable {
protected T value = null; // single value protected List<T> values; // multiple values // getters and setters for the value and values implemented. }
Like I said earlier I have another version of this same program that uses import mx.collections.ArrayCollectioninstead of
org.apache.royale.collections.ArrayList
with this line commented out
// registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
It works fine the List<String> or List<Short> is converted to ArrayCollection. I can then iterate and access the String or int (Short) respectively.
On Thursday, June 24, 2021, 10:31:35 PM GMT+1, users-digest-help@royale.apache.org <us...@royale.apache.org> wrote:
users Digest 24 Jun 2021 21:31:33 -0000 Issue 1730
Topics (messages 4780 through 4780)
Re: [EXTERNAL] Re: users Digest 24 Jun 2021 19:45:18 -0000 Issue 1728
4780 by: Brian Raymes
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org
For additional commands, e-mail: users-digest-help@royale.apache.org
----------------------------------------------------------------------
<!--#yiv3273004625 _filtered {} _filtered {} _filtered {} _filtered {}#yiv3273004625 #yiv3273004625 p.yiv3273004625MsoNormal, #yiv3273004625 li.yiv3273004625MsoNormal, #yiv3273004625 div.yiv3273004625MsoNormal {margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 a:link, #yiv3273004625 span.yiv3273004625MsoHyperlink {color:blue;text-decoration:underline;}#yiv3273004625 a:visited, #yiv3273004625 span.yiv3273004625MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv3273004625 p.yiv3273004625MsoListParagraph, #yiv3273004625 li.yiv3273004625MsoListParagraph, #yiv3273004625 div.yiv3273004625MsoListParagraph {margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msonormal0, #yiv3273004625 li.yiv3273004625msonormal0, #yiv3273004625 div.yiv3273004625msonormal0 {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msonormal, #yiv3273004625 li.yiv3273004625msonormal, #yiv3273004625 div.yiv3273004625msonormal {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msonormal5, #yiv3273004625 li.yiv3273004625msonormal5, #yiv3273004625 div.yiv3273004625msonormal5 {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msochpdefault, #yiv3273004625 li.yiv3273004625msochpdefault, #yiv3273004625 div.yiv3273004625msochpdefault {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 span.yiv3273004625msohyperlink {}#yiv3273004625 p.yiv3273004625msonormal1, #yiv3273004625 li.yiv3273004625msonormal1, #yiv3273004625 div.yiv3273004625msonormal1 {margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msonormal2, #yiv3273004625 li.yiv3273004625msonormal2, #yiv3273004625 div.yiv3273004625msonormal2 {margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 span.yiv3273004625msohyperlink1 {color:blue;text-decoration:underline;}#yiv3273004625 p.yiv3273004625msonormal3, #yiv3273004625 li.yiv3273004625msonormal3, #yiv3273004625 div.yiv3273004625msonormal3 {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msonormal51, #yiv3273004625 li.yiv3273004625msonormal51, #yiv3273004625 div.yiv3273004625msonormal51 {margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msonormal52, #yiv3273004625 li.yiv3273004625msonormal52, #yiv3273004625 div.yiv3273004625msonormal52 {margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 p.yiv3273004625msochpdefault1, #yiv3273004625 li.yiv3273004625msochpdefault1, #yiv3273004625 div.yiv3273004625msochpdefault1 {margin-right:0in;margin-left:0in;font-size:10.0pt;font-family:"Calibri", sans-serif;}#yiv3273004625 span.yiv3273004625EmailStyle31 {font-family:"Calibri", sans-serif;color:windowtext;}#yiv3273004625 .yiv3273004625MsoChpDefault {font-size:10.0pt;} _filtered {}#yiv3273004625 div.yiv3273004625WordSection1 {}-->
I’m a bit confused by this:
> The values arrayList in this two classes are implemented as List<String> and List<Short>
Shouldn’t they be List<StringType> and List<ShortType> ?
For example, the alias is what tells Royale which Java class to match to:
> [RemoteClass(alias="com.mdx.generic.dto.types.StringType")]
The “remote class” is StringType, not String, and ShortType, not Short.
From: romanisitua@yahoo.com <ro...@yahoo.com>
Sent: Thursday, June 24, 2021 2:22 PM
To: users@royale.apache.org
Subject: [EXTERNAL] Re: users Digest 24 Jun 2021 19:45:18 -0000 Issue 1728
Thanks for the feedback
I tried your suggestion
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
The arrayList of Custom object in my case represented by ArrayList<Record> (server side java) is serialized succesfully
However, I have two other as3 classes namely, StringType and ShortType. This classes are defined as follows
import org.apache.royale.collections.ArrayList;
//import mx.collections.ArrayCollection;
[RemoteClass(alias="com.mdx.generic.dto.types.StringType")]
[Bindable]
public class StringType implements Attribute
{
private var _name:String;
private var _value:String;
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
// other get and set here
}
[RemoteClass(alias="com.mdx.generic.dto.types.ShortType")]
[Bindable]
public class ShortType implements Attribute
{
private var _name:String;
private var _value:int;
private var _values:ArrayList;
public function ShortType()
{
trace(" --- init short type --- ");
}
public function set name(name:String) : void
{
this._name = name;
}
public function get name():String
{
return this._name;
}
public function set value(value:int) : void
{
this._value = value;
}
public function get value():int
{
return this._value;
}
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
The StringType and ShortType as3 classes map to server side java classes.
The values arrayList in this two classes are implemented as List<String> and List<Short>
respectively in java server side. The outcome is Serialization is not correct
When I output the content of the value arraylist I get
Language.as:254 attribute title field name:title
Language.as:254 title string type values: [object Object]
Language.as:254 attribute account type field name:accountCategory
Language.as:254 account short type values: [object Object]
Iterating through the object I get undefined for each value
However,
If I comment out the line
// registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
And refactor the as3 StringType and ShortType to use
mx.collections.ArrayCollection it works.
The log is as follows.
Language.as:254 title string type values: Mr,Mrs
Language.as:254 account short type values: 14,100,102
The downside to this is that I have to convert to royale arrayList to display using jewel ui.
Regards,
On Thursday, June 24, 2021, 08:45:21 PM GMT+1,users-digest-help@royale.apache.org <us...@royale.apache.org> wrote:
users Digest 24 Jun 2021 19:45:18 -0000 Issue 1728
Topics (messages 4777 through 4777)
Re: users Digest 24 Jun 2021 17:47:56 -0000 Issue 1725
4777 by: Maria Jose Esteve
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail:users@royale.apache.org
To unsubscribe, e-mail:users-digest-unsubscribe@royale.apache.org
For additional commands, e-mail:users-digest-help@royale.apache.org
----------------------------------------------------------------------
No romanisitua conversion,
I have fixed the mx remote object issue. I can now make calls to blazeds. For typed java ArrayList, I noticed that blazeds returns "mx.collections.ArrayCollection" object in my as3 class. So I have to do a conversion to "org.apache.royale.collections.ArrayList" to use in the jewel datagrid.
If you put the registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList); that I told you in the previous post, the mapping isn't that direct?
Hiedra
De:romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: jueves, 24 de junio de 2021 19:58
Para: users@royale.apache.org
Asunto: Re: users Digest 24 Jun 2021 17:47:56 -0000 Issue 1725
David thanks for your mail. For this example, I am using vs code with maven to compile the project.
I intend to try out moonshine again. I had an issue with the maven plug in when using moonshine. But I was told it has been fixed with the lastest moonshine update.
I have fixed the mx remote object issue. I can now make calls to blazeds. For typed java ArrayList, I noticed that blazeds returns "mx.collections.ArrayCollection" object in my as3 class. So I have to do a conversion to "org.apache.royale.collections.ArrayList" to use in the jewel datagrid.
Regards,
On Thursday, June 24, 2021, 06:47:57 PM GMT+1,users-digest-help@royale.apache.org <us...@royale.apache.org> wrote:
users Digest 24 Jun 2021 17:47:56 -0000 Issue 1725
Topics (messages 4770 through 4773)
Re: Switching from js remoteObject to mx remoteObject
4770 by: Maria Jose Esteve
4772 by: Maria Jose Esteve
Re: Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
4771 by: David Slotemaker de Bruine
Re: users Digest 23 Jun 2021 15:46:41 -0000 Issue 1724
4773 by: romanisitua.yahoo.com
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail:users@royale.apache.org
To unsubscribe, e-mail:users-digest-unsubscribe@royale.apache.org
For additional commands, e-mail:users-digest-help@royale.apache.org
----------------------------------------------------------------------
¿Cómo estás compilando? Ant, asconfigc, mvn? Te faltará indicar la dependencia a MXRoyale.swc/MXRoyaleJS.swc
De:romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: martes, 22 de junio de 2021 11:38
Para: users@royale.apache.org
Asunto: Switching from js remoteObject to mx remoteObject
Hi everyone,
I am trying to switch from usingjs:RemoteObject to mx:RemoteObject.
I have studied the code in the "remote object amf test" project.
I am using jewel for the application. After registering the mx namespace
in the relevant places
xmlns:mx="library://ns.apache.org/royale/mx"
During compilation I get the following error
Content2.mxml(85): col: 11 Error: This tag is unexpected. It will be ignored.
<mx:RemoteObject id="service" result="onResult(event)" fault="onFault(event)"
It appears the compiler does not recognise the mx:RemoteObject class.
In other words the mx library is not loaded. I have checked my pom.xml to ensure that
the required royale dependencies is loaded.
Any ideas ?
Regards,
Forgive me, I did not translate...
“How are you compiling? Ant, asconfigc, mvn? You will be missing the dependency to MXRoyale.swc/MXRoyaleJS.swc”
As David told you in the other post, the first thing you should do is to change to mx.
De: Maria Jose Esteve <mj...@iest.com>
Enviado el: miércoles, 23 de junio de 2021 17:48
Para: users@royale.apache.org
Asunto: RE: Switching from js remoteObject to mx remoteObject
¿Cómo estás compilando? Ant, asconfigc, mvn? Te faltará indicar la dependencia a MXRoyale.swc/MXRoyaleJS.swc
De:romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: martes, 22 de junio de 2021 11:38
Para: users@royale.apache.org
Asunto: Switching from js remoteObject to mx remoteObject
Hi everyone,
I am trying to switch from usingjs:RemoteObject to mx:RemoteObject.
I have studied the code in the "remote object amf test" project.
I am using jewel for the application. After registering the mx namespace
in the relevant places
xmlns:mx="library://ns.apache.org/royale/mx"
During compilation I get the following error
Content2.mxml(85): col: 11 Error: This tag is unexpected. It will be ignored.
<mx:RemoteObject id="service" result="onResult(event)" fault="onFault(event)"
It appears the compiler does not recognise the mx:RemoteObject class.
In other words the mx library is not loaded. I have checked my pom.xml to ensure that
the required royale dependencies is loaded.
Any ideas ?
Regards,
Hi Roman,
I use BlazeDS, and I had all sorts of trouble using the js:Remote and the experts recomended I use mx:Remote.
So you need to start there I think. What IDE are you using? I am using Moonshine.
I can send you my config if thats what you are on.
Cheers,
David
On Wed, 23 Jun 2021 at 17:46, Maria Jose Esteve <mj...@iest.com> wrote:
Hi romanisitua,
I have not worked with Blazeds, I have always used FluorineFx withvb.net so I do not know if what I am going to tell you will be useful to you...
- Make sure that event.result returns the ShortType.vlues and StringType.values object, which "I understand you do get them right".
- Check that the type class of each of the rows of "values" is recognized and mapped (If you launch debug, you can set a breakpoint and expand event.result).
- If it has not recognized and mapped the classes.... Verify that they are defined in "com.test.generic.dto.types.*".
- Verify that in App.mxml you have indicated : registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
- Could you send me the code of the callback function?
Verify me these points and we continue with the debugging.
Hiedra.
De:romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: martes, 22 de junio de 2021 22:50
Para: users@royale.apache.org
Asunto: Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
Hi everyone,
I have the following classes server side
public class ShortType
{
private List<Short> values;
// values has getter and setter
}
public class StringType
{
private List<String> values;
// values has getter and setter
}
With their corresponding as3 classes
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.ShortType")]
[Bindable]
public class ShortType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.StringType")]
[Bindable]
public class StringType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
When trying to access the values arrayList in royale the content of the array list is incorrect
for example if a put short values 14, 100 in the arrayList server side, I will get an array list with values (0, 1)
The samething if I put String vales "Mr", "Mrs" in the arrayList server side, I will get an array list with values (0,1)
Clearly blazeds is not serializing theList<String> andList<Short>.
Any ideas ? I am using js:RemoteObject to perform the call.
I tried switching to mx royale but I keep getting compiler errors whenever I reference mx royale classes. I tried to follow the example where mx royale remote object was used in a jewel app but compiler errors keep coming up.
Would appreciate help on this. I am pretty stuck at the moment.
Regards,
--
David Slotemaker de Bruïne
Head of Educational Robotics
Av. Sarriá, 130 - 08017 Barcelona
T. +34 932 523 729 ext. 135
dslotemaker@vicensvives.com
Good Day,
Thanks for your response. I have resolved the issues I was having. I have been able to do test with mx royale remote object. I discovered that I had to use the maven compilation option "option-with-swf". Then added some more dependencies. I looked up the dependencies from the parent module in the Remote AMF example project.
I have noticed that blazeds returns an "mx.collections.ArrayCollection" object for arrayList of custom object or arrayList of String or arrayList of Short server side (java).
As a result, adding the below code
registerClassAlias("flex.messaging.io.ArrayList", ArrayList); //
to give me
org.apache.royale.collections.ArrayList
Does not work. As a result, I have to convert to convert from "mx.collections.ArrayCollection" to "org.apache.royale.collections.ArrayList" to use my records in jewel datagrid.
I don't mind doing the conversion but I am wondering if this is an abnormal situation. Any ideas ?
Also please what is the maven dependency for
import org.apache.royale.net.remoting.amf.AMFBinaryData
AMFBinaryData.DEBUG = true;
The above code does not compile. I had to comment it out.
Regards,
On Thursday, June 24, 2021, 06:45:59 PM GMT+1,romanisitua@yahoo.com <ro...@yahoo.com> wrote:
Good Day,
Thanks for your response. I have resolved the issues I was having. I have been able to do test with mx royale remote object. I discovered that I had to use the maven compilation option "option-with-swf". Then added some more dependencies. I looked up the dependencies from the parent module in the Remote AMF example project.
I have noticed that blazeds returns an "mx.collections.ArrayCollection" object for arrayList of custom object or arrayList of String or arrayList of Short server side (java).
As a result, adding the below code
registerClassAlias("flex.messaging.io.ArrayList", ArrayList); //
to give me
org.apache.royale.collections.ArrayList
Does not work. As a result, I have to convert to convert from "mx.collections.ArrayCollection" to "org.apache.royale.collections.ArrayList" to use my records in jewel datagrid.
I don't mind doing the conversion but I am wondering if this is an abnormal situation. Any ideas ?
Also please what is the maven dependency for
import org.apache.royale.net.remoting.amf.AMFBinaryData
AMFBinaryData.DEBUG = true;
The above code does not compile. I had to comment it out.
Regards,
On Wednesday, June 23, 2021, 04:46:44 PM GMT+1, <us...@royale.apache.org> wrote:
users Digest 23 Jun 2021 15:46:41 -0000 Issue 1724
Topics (messages 4767 through 4769)
Switching from js remoteObject to mx remoteObject
4767 by: romanisitua.yahoo.com
Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
4768 by: romanisitua.yahoo.com
4769 by: Maria Jose Esteve
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail:users@royale.apache.org
To unsubscribe, e-mail:users-digest-unsubscribe@royale.apache.org
For additional commands, e-mail:users-digest-help@royale.apache.org
----------------------------------------------------------------------
Hi everyone,
I am trying to switch from usingjs:RemoteObject to mx:RemoteObject.
I have studied the code in the "remote object amf test" project.
I am using jewel for the application. After registering the mx namespace
in the relevant places
xmlns:mx="library://ns.apache.org/royale/mx"
During compilation I get the following error
Content2.mxml(85): col: 11 Error: This tag is unexpected. It will be ignored.
<mx:RemoteObject id="service" result="onResult(event)" fault="onFault(event)"
It appears the compiler does not recognise the mx:RemoteObject class.
In other words the mx library is not loaded. I have checked my pom.xml to ensure that
the required royale dependencies is loaded.
Any ideas ?
Regards,
Hi everyone,
I have the following classes server side
public class ShortType
{
private List<Short> values;
// values has getter and setter
}
public class StringType
{
private List<String> values;
// values has getter and setter
}
With their corresponding as3 classes
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.ShortType")]
[Bindable]
public class ShortType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.StringType")]
[Bindable]
public class StringType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
When trying to access the values arrayList in royale the content of the array list is incorrect
for example if a put short values 14, 100 in the arrayList server side, I will get an array list with values (0, 1)
The samething if I put String vales "Mr", "Mrs" in the arrayList server side, I will get an array list with values (0,1)
Clearly blazeds is not serializing theList<String> andList<Short>.
Any ideas ? I am using js:RemoteObject to perform the call.
I tried switching to mx royale but I keep getting compiler errors whenever I reference mx royale classes. I tried to follow the example where mx royale remote object was used in a jewel app but compiler errors keep coming up.
Would appreciate help on this. I am pretty stuck at the moment.
Regards,
Hi romanisitua,
I have not worked with Blazeds, I have always used FluorineFx with vb.net so I do not know if what I am going to tell you will be useful to you...
- Make sure that event.result returns the ShortType.vlues and StringType.values object, which "I understand you do get them right".
- Check that the type class of each of the rows of "values" is recognized and mapped (If you launch debug, you can set a breakpoint and expand event.result).
- If it has not recognized and mapped the classes.... Verify that they are defined in "com.test.generic.dto.types.*".
- Verify that in App.mxml you have indicated : registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
- Could you send me the code of the callback function?
Verify me these points and we continue with the debugging.
Hiedra.
De:romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: martes, 22 de junio de 2021 22:50
Para: users@royale.apache.org
Asunto: Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
Hi everyone,
I have the following classes server side
public class ShortType
{
private List<Short> values;
// values has getter and setter
}
public class StringType
{
private List<String> values;
// values has getter and setter
}
With their corresponding as3 classes
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.ShortType")]
[Bindable]
public class ShortType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.StringType")]
[Bindable]
public class StringType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
When trying to access the values arrayList in royale the content of the array list is incorrect
for example if a put short values 14, 100 in the arrayList server side, I will get an array list with values (0, 1)
The samething if I put String vales "Mr", "Mrs" in the arrayList server side, I will get an array list with values (0,1)
Clearly blazeds is not serializing theList<String> andList<Short>.
Any ideas ? I am using js:RemoteObject to perform the call.
I tried switching to mx royale but I keep getting compiler errors whenever I reference mx royale classes. I tried to follow the example where mx royale remote object was used in a jewel app but compiler errors keep coming up.
Would appreciate help on this. I am pretty stuck at the moment.
Regards,
RE: users Digest 24 Jun 2021 21:31:33 -0000 Issue 1730
Posted by Maria Jose Esteve <mj...@iest.com>.
Romanisitua, Could we do a direct test against your backend, can you post it temporarily?
I'm convinced it's a silly thing we're not seeing?
De: romanisitua@yahoo.com <ro...@yahoo.com>
Enviado el: jueves, 24 de junio de 2021 23:50
Para: users@royale.apache.org
Asunto: Re: users Digest 24 Jun 2021 21:31:33 -0000 Issue 1730
I have attached the source files for StringType and ShortType both the as3 and java equivalents
Note: The java version of StringType and ShortType extend AbstractType
AbstractType is defined as follows
public abstract class AbstractType<T> implements Serializable
{
protected T value = null; // single value
protected List<T> values; // multiple values
// getters and setters for the value and values implemented.
}
Like I said earlier I have another version of this same program that uses
import mx.collections.ArrayCollection
instead of
org.apache.royale.collections.ArrayList
with this line commented out
// registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
It works fine the List<String> or List<Short> is converted to ArrayCollection. I can then iterate and access the String or int (Short) respectively.
On Thursday, June 24, 2021, 10:31:35 PM GMT+1, users-digest-help@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>> wrote:
users Digest 24 Jun 2021 21:31:33 -0000 Issue 1730
Topics (messages 4780 through 4780)
Re: [EXTERNAL] Re: users Digest 24 Jun 2021 19:45:18 -0000 Issue 1728
4780 by: Brian Raymes
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org<ma...@royale.apache.org>
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org<ma...@royale.apache.org>
For additional commands, e-mail: users-digest-help@royale.apache.org<ma...@royale.apache.org>
----------------------------------------------------------------------
I’m a bit confused by this:
> The values arrayList in this two classes are implemented as List<String> and List<Short>
Shouldn’t they be List<StringType> and List<ShortType> ?
For example, the alias is what tells Royale which Java class to match to:
> [RemoteClass(alias="com.mdx.generic.dto.types.StringType")]
The “remote class” is StringType, not String, and ShortType, not Short.
From: romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>>
Sent: Thursday, June 24, 2021 2:22 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: [EXTERNAL] Re: users Digest 24 Jun 2021 19:45:18 -0000 Issue 1728
Thanks for the feedback
I tried your suggestion
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
The arrayList of Custom object in my case represented by ArrayList<Record> (server side java) is serialized succesfully
However, I have two other as3 classes namely, StringType and ShortType. This classes are defined as follows
import org.apache.royale.collections.ArrayList;
//import mx.collections.ArrayCollection;
[RemoteClass(alias="com.mdx.generic.dto.types.StringType")]
[Bindable]
public class StringType implements Attribute
{
private var _name:String;
private var _value:String;
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
// other get and set here
}
[RemoteClass(alias="com.mdx.generic.dto.types.ShortType")]
[Bindable]
public class ShortType implements Attribute
{
private var _name:String;
private var _value:int;
private var _values:ArrayList;
public function ShortType()
{
trace(" --- init short type --- ");
}
public function set name(name:String) : void
{
this._name = name;
}
public function get name():String
{
return this._name;
}
public function set value(value:int) : void
{
this._value = value;
}
public function get value():int
{
return this._value;
}
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
The StringType and ShortType as3 classes map to server side java classes.
The values arrayList in this two classes are implemented as List<String> and List<Short>
respectively in java server side. The outcome is Serialization is not correct
When I output the content of the value arraylist I get
Language.as:254 attribute title field name:title
Language.as:254 title string type values: [object Object]
Language.as:254 attribute account type field name:accountCategory
Language.as:254 account short type values: [object Object]
Iterating through the object I get undefined for each value
However,
If I comment out the line
// registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
And refactor the as3 StringType and ShortType to use
mx.collections.ArrayCollection it works.
The log is as follows.
Language.as:254 title string type values: Mr,Mrs
Language.as:254 account short type values: 14,100,102
The downside to this is that I have to convert to royale arrayList to display using jewel ui.
Regards,
On Thursday, June 24, 2021, 08:45:21 PM GMT+1, users-digest-help@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>> wrote:
users Digest 24 Jun 2021 19:45:18 -0000 Issue 1728
Topics (messages 4777 through 4777)
Re: users Digest 24 Jun 2021 17:47:56 -0000 Issue 1725
4777 by: Maria Jose Esteve
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org<ma...@royale.apache.org>
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org<ma...@royale.apache.org>
For additional commands, e-mail: users-digest-help@royale.apache.org<ma...@royale.apache.org>
----------------------------------------------------------------------
No romanisitua conversion,
I have fixed the mx remote object issue. I can now make calls to blazeds. For typed java ArrayList, I noticed that blazeds returns "mx.collections.ArrayCollection" object in my as3 class. So I have to do a conversion to "org.apache.royale.collections.ArrayList" to use in the jewel datagrid.
If you put the registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList); that I told you in the previous post, the mapping isn't that direct?
Hiedra
De: romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>>
Enviado el: jueves, 24 de junio de 2021 19:58
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: users Digest 24 Jun 2021 17:47:56 -0000 Issue 1725
David thanks for your mail. For this example, I am using vs code with maven to compile the project.
I intend to try out moonshine again. I had an issue with the maven plug in when using moonshine. But I was told it has been fixed with the lastest moonshine update.
I have fixed the mx remote object issue. I can now make calls to blazeds. For typed java ArrayList, I noticed that blazeds returns "mx.collections.ArrayCollection" object in my as3 class. So I have to do a conversion to "org.apache.royale.collections.ArrayList" to use in the jewel datagrid.
Regards,
On Thursday, June 24, 2021, 06:47:57 PM GMT+1, users-digest-help@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>> wrote:
users Digest 24 Jun 2021 17:47:56 -0000 Issue 1725
Topics (messages 4770 through 4773)
Re: Switching from js remoteObject to mx remoteObject
4770 by: Maria Jose Esteve
4772 by: Maria Jose Esteve
Re: Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
4771 by: David Slotemaker de Bruine
Re: users Digest 23 Jun 2021 15:46:41 -0000 Issue 1724
4773 by: romanisitua.yahoo.com
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org<ma...@royale.apache.org>
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org<ma...@royale.apache.org>
For additional commands, e-mail: users-digest-help@royale.apache.org<ma...@royale.apache.org>
----------------------------------------------------------------------
¿Cómo estás compilando? Ant, asconfigc, mvn? Te faltará indicar la dependencia a MXRoyale.swc/MXRoyaleJS.swc
De: romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>>
Enviado el: martes, 22 de junio de 2021 11:38
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Switching from js remoteObject to mx remoteObject
Hi everyone,
I am trying to switch from using js:RemoteObject to mx:RemoteObject.
I have studied the code in the "remote object amf test" project.
I am using jewel for the application. After registering the mx namespace
in the relevant places
xmlns:mx="library://ns.apache.org/royale/mx"
During compilation I get the following error
Content2.mxml(85): col: 11 Error: This tag is unexpected. It will be ignored.
<mx:RemoteObject id="service" result="onResult(event)" fault="onFault(event)"
It appears the compiler does not recognise the mx:RemoteObject class.
In other words the mx library is not loaded. I have checked my pom.xml to ensure that
the required royale dependencies is loaded.
Any ideas ?
Regards,
Forgive me, I did not translate...
“How are you compiling? Ant, asconfigc, mvn? You will be missing the dependency to MXRoyale.swc/MXRoyaleJS.swc”
As David told you in the other post, the first thing you should do is to change to mx.
De: Maria Jose Esteve <mj...@iest.com>>
Enviado el: miércoles, 23 de junio de 2021 17:48
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: RE: Switching from js remoteObject to mx remoteObject
¿Cómo estás compilando? Ant, asconfigc, mvn? Te faltará indicar la dependencia a MXRoyale.swc/MXRoyaleJS.swc
De: romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>>
Enviado el: martes, 22 de junio de 2021 11:38
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Switching from js remoteObject to mx remoteObject
Hi everyone,
I am trying to switch from using js:RemoteObject to mx:RemoteObject.
I have studied the code in the "remote object amf test" project.
I am using jewel for the application. After registering the mx namespace
in the relevant places
xmlns:mx="library://ns.apache.org/royale/mx"
During compilation I get the following error
Content2.mxml(85): col: 11 Error: This tag is unexpected. It will be ignored.
<mx:RemoteObject id="service" result="onResult(event)" fault="onFault(event)"
It appears the compiler does not recognise the mx:RemoteObject class.
In other words the mx library is not loaded. I have checked my pom.xml to ensure that
the required royale dependencies is loaded.
Any ideas ?
Regards,
Hi Roman,
I use BlazeDS, and I had all sorts of trouble using the js:Remote and the experts recomended I use mx:Remote.
So you need to start there I think. What IDE are you using? I am using Moonshine.
I can send you my config if thats what you are on.
Cheers,
David
On Wed, 23 Jun 2021 at 17:46, Maria Jose Esteve <mj...@iest.com>> wrote:
Hi romanisitua,
I have not worked with Blazeds, I have always used FluorineFx with vb.net<http://vb.net> so I do not know if what I am going to tell you will be useful to you...
- Make sure that event.result returns the ShortType.vlues and StringType.values object, which "I understand you do get them right".
- Check that the type class of each of the rows of "values" is recognized and mapped (If you launch debug, you can set a breakpoint and expand event.result).
- If it has not recognized and mapped the classes.... Verify that they are defined in "com.test.generic.dto.types.*".
- Verify that in App.mxml you have indicated : registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
- Could you send me the code of the callback function?
Verify me these points and we continue with the debugging.
Hiedra.
De: romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>>
Enviado el: martes, 22 de junio de 2021 22:50
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
Hi everyone,
I have the following classes server side
public class ShortType
{
private List<Short> values;
// values has getter and setter
}
public class StringType
{
private List<String> values;
// values has getter and setter
}
With their corresponding as3 classes
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.ShortType")]
[Bindable]
public class ShortType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.StringType")]
[Bindable]
public class StringType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
When trying to access the values arrayList in royale the content of the array list is incorrect
for example if a put short values 14, 100 in the arrayList server side, I will get an array list with values (0, 1)
The samething if I put String vales "Mr", "Mrs" in the arrayList server side, I will get an array list with values (0,1)
Clearly blazeds is not serializing the List<String> and List<Short>.
Any ideas ? I am using js:RemoteObject to perform the call.
I tried switching to mx royale but I keep getting compiler errors whenever I reference mx royale classes. I tried to follow the example where mx royale remote object was used in a jewel app but compiler errors keep coming up.
Would appreciate help on this. I am pretty stuck at the moment.
Regards,
--
David Slotemaker de Bruïne
Head of Educational Robotics
[https://docs.google.com/uc?export=download&id=1hpaD5Yp2v5dsrHcFGfM0jvZLIii5bsag&revid=0B1k3qc0H07_WSWptMmg5ejd6N3BYeERrWk1MKytQamRFMFcwPQ]
Av. Sarriá, 130 - 08017 Barcelona<https://maps.google.com/?q=Av.+Sarri%C3%A1,+130+-+08017+Barcelona&entry=gmail&source=g>
T. +34 932 523 729 ext. 135
dslotemaker@vicensvives.com<ma...@vicensvives.com>
Good Day,
Thanks for your response. I have resolved the issues I was having. I have been able to do test with mx royale remote object. I discovered that I had to use the maven compilation option "option-with-swf". Then added some more dependencies. I looked up the dependencies from the parent module in the Remote AMF example project.
I have noticed that blazeds returns an "mx.collections.ArrayCollection" object for arrayList of custom object or arrayList of String or arrayList of Short server side (java).
As a result, adding the below code
registerClassAlias("flex.messaging.io.ArrayList", ArrayList); //
to give me
org.apache.royale.collections.ArrayList
Does not work. As a result, I have to convert to convert from "mx.collections.ArrayCollection" to "org.apache.royale.collections.ArrayList" to use my records in jewel datagrid.
I don't mind doing the conversion but I am wondering if this is an abnormal situation. Any ideas ?
Also please what is the maven dependency for
import org.apache.royale.net.remoting.amf.AMFBinaryData
AMFBinaryData.DEBUG = true;
The above code does not compile. I had to comment it out.
Regards,
On Thursday, June 24, 2021, 06:45:59 PM GMT+1, romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>> wrote:
Good Day,
Thanks for your response. I have resolved the issues I was having. I have been able to do test with mx royale remote object. I discovered that I had to use the maven compilation option "option-with-swf". Then added some more dependencies. I looked up the dependencies from the parent module in the Remote AMF example project.
I have noticed that blazeds returns an "mx.collections.ArrayCollection" object for arrayList of custom object or arrayList of String or arrayList of Short server side (java).
As a result, adding the below code
registerClassAlias("flex.messaging.io.ArrayList", ArrayList); //
to give me
org.apache.royale.collections.ArrayList
Does not work. As a result, I have to convert to convert from "mx.collections.ArrayCollection" to "org.apache.royale.collections.ArrayList" to use my records in jewel datagrid.
I don't mind doing the conversion but I am wondering if this is an abnormal situation. Any ideas ?
Also please what is the maven dependency for
import org.apache.royale.net.remoting.amf.AMFBinaryData
AMFBinaryData.DEBUG = true;
The above code does not compile. I had to comment it out.
Regards,
On Wednesday, June 23, 2021, 04:46:44 PM GMT+1, <us...@royale.apache.org>> wrote:
users Digest 23 Jun 2021 15:46:41 -0000 Issue 1724
Topics (messages 4767 through 4769)
Switching from js remoteObject to mx remoteObject
4767 by: romanisitua.yahoo.com
Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
4768 by: romanisitua.yahoo.com
4769 by: Maria Jose Esteve
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: users@royale.apache.org<ma...@royale.apache.org>
To unsubscribe, e-mail: users-digest-unsubscribe@royale.apache.org<ma...@royale.apache.org>
For additional commands, e-mail: users-digest-help@royale.apache.org<ma...@royale.apache.org>
----------------------------------------------------------------------
Hi everyone,
I am trying to switch from using js:RemoteObject to mx:RemoteObject.
I have studied the code in the "remote object amf test" project.
I am using jewel for the application. After registering the mx namespace
in the relevant places
xmlns:mx="library://ns.apache.org/royale/mx"
During compilation I get the following error
Content2.mxml(85): col: 11 Error: This tag is unexpected. It will be ignored.
<mx:RemoteObject id="service" result="onResult(event)" fault="onFault(event)"
It appears the compiler does not recognise the mx:RemoteObject class.
In other words the mx library is not loaded. I have checked my pom.xml to ensure that
the required royale dependencies is loaded.
Any ideas ?
Regards,
Hi everyone,
I have the following classes server side
public class ShortType
{
private List<Short> values;
// values has getter and setter
}
public class StringType
{
private List<String> values;
// values has getter and setter
}
With their corresponding as3 classes
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.ShortType")]
[Bindable]
public class ShortType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.StringType")]
[Bindable]
public class StringType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
When trying to access the values arrayList in royale the content of the array list is incorrect
for example if a put short values 14, 100 in the arrayList server side, I will get an array list with values (0, 1)
The samething if I put String vales "Mr", "Mrs" in the arrayList server side, I will get an array list with values (0,1)
Clearly blazeds is not serializing the List<String> and List<Short>.
Any ideas ? I am using js:RemoteObject to perform the call.
I tried switching to mx royale but I keep getting compiler errors whenever I reference mx royale classes. I tried to follow the example where mx royale remote object was used in a jewel app but compiler errors keep coming up.
Would appreciate help on this. I am pretty stuck at the moment.
Regards,
Hi romanisitua,
I have not worked with Blazeds, I have always used FluorineFx with vb.net so I do not know if what I am going to tell you will be useful to you...
- Make sure that event.result returns the ShortType.vlues and StringType.values object, which "I understand you do get them right".
- Check that the type class of each of the rows of "values" is recognized and mapped (If you launch debug, you can set a breakpoint and expand event.result).
- If it has not recognized and mapped the classes.... Verify that they are defined in "com.test.generic.dto.types.*".
- Verify that in App.mxml you have indicated : registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
- Could you send me the code of the callback function?
Verify me these points and we continue with the debugging.
Hiedra.
De: romanisitua@yahoo.com<ma...@yahoo.com> <ro...@yahoo.com>>
Enviado el: martes, 22 de junio de 2021 22:50
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Blaze ds does not serialize typed java arrayList to as3 arrayList correctly
Hi everyone,
I have the following classes server side
public class ShortType
{
private List<Short> values;
// values has getter and setter
}
public class StringType
{
private List<String> values;
// values has getter and setter
}
With their corresponding as3 classes
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.ShortType")]
[Bindable]
public class ShortType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
import org.apache.royale.collections.ArrayList;
[RemoteClass(alias="com.test.generic.dto.types.StringType")]
[Bindable]
public class StringType
{
private var _values:ArrayList;
public function set values(values:ArrayList) : void
{
trace(" --- short values list set --- ");
this._values = values;
}
public function get values():ArrayList
{
return this._values;
}
}
When trying to access the values arrayList in royale the content of the array list is incorrect
for example if a put short values 14, 100 in the arrayList server side, I will get an array list with values (0, 1)
The samething if I put String vales "Mr", "Mrs" in the arrayList server side, I will get an array list with values (0,1)
Clearly blazeds is not serializing the List<String> and List<Short>.
Any ideas ? I am using js:RemoteObject to perform the call.
I tried switching to mx royale but I keep getting compiler errors whenever I reference mx royale classes. I tried to follow the example where mx royale remote object was used in a jewel app but compiler errors keep coming up.
Would appreciate help on this. I am pretty stuck at the moment.
Regards,