You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/05/29 11:06:35 UTC

[GitHub] [royale-asjs] pashminakazi opened a new issue #845: VO sended to java side with incorrect argument

pashminakazi opened a new issue #845:
URL: https://github.com/apache/royale-asjs/issues/845


   Project Details are :
   https://paste.apache.org/cpo8y
   Test case is available on VDI.
   Go to Inventory from Select in Menu
   Go to DPR Remarks Setup from Setups in Menu
   File : com/dbz/modules/INV/dbzDPRremarksSetup.mxml
   
   Add site and Remarks and click save button this error will be occured
   ![image](https://user-images.githubusercontent.com/42200979/83253040-bb3a2280-a1c5-11ea-916b-9f166a155585.png)
   
   
   I am sending,dont know why **com.dbz.VO.INV.dbzDPRremarksSetupVO** is sended to java as **flex.messaging.io.amf.ASObject** 
   ```
   var token2:AsyncToken = roPersist.fn_AddRecord(TcSetupVO, 
   										parentMxmlDocument.parentMxmlDocument.parentMxmlDocument.userParams.USER_ID, 
   										"Save Record",
   										parentMxmlDocument.parentMxmlDocument.parentMxmlDocument.CompCode,	
   										dp_code.text, 
   										bNewRecord);
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] brianraymes commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
brianraymes commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-641644506


   > Thanks. @brianraymes can you see if you have ClassAliasBead in your setup? thanks
   
   Yes, I have that set. If I can remember correctly, none of it worked without that bead. My issue is that `[RemoteClass(alias = "full.path"]` doesn't seem to work ("register") in all cases. That being said, my work-around(s) are sufficient.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] carlosrovira commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-639546115


   Hi, 
   
   don't know exactly what's the problem, but want to ask if you all already used `[RemoteClass]` metadata in the VO to establish the relationship with the Java class. I never had any issue using it, and we have very complex java tree graph objects in many cases.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] carlosrovira commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-640021398


   Hi Brian.
   
   for what you report this seems like a bug in some part of the implementation. If you have a work around for now is good to be able to continue working. I think @greg-dove hopefully could know more about what could be the problem.
   
   Thanks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] carlosrovira commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
carlosrovira commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-641610143


   Thanks. @brianraymes  can you see if you have ClassAliasBead in your setup? thanks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] pashminakazi closed issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
pashminakazi closed issue #845:
URL: https://github.com/apache/royale-asjs/issues/845


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] pashminakazi commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
pashminakazi commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-641479750


   Issue has been resolved,I forget to add classAliasBead in my Setup that's why this problem was occured.Thank u so much All of you


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] brianraymes commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
brianraymes commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-639700475


   For myself, I also use the `[RemoteClass(alias = "full.path"]` annotation in all of my VOs, but it has never been enough. The same goes for my legacy Flex 3 application that I am in the middle of porting to Royale.
   
   For the most part, the `RemoteClass` annotation appears to work, but in several scenarios, some objects deserialize without their proper type (ASObject). In order to get around it, I either have to manually register a class alias, or declare one instance of said class -- both can solve this issue. To automate it for us, someone built a script to generate a class that imports and declares every VO we have and is instantiated on app initialization. We've had that in place for so long that I've never really thought about it until now.
   
   Perhaps there is something I'm missing as well? Is there something besides `RemoteClass` that should be set/configured for those to work properly?
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] brianraymes commented on issue #845: VO sended to java side with incorrect argument

Posted by GitBox <gi...@apache.org>.
brianraymes commented on issue #845:
URL: https://github.com/apache/royale-asjs/issues/845#issuecomment-639187900


   I ran into a similar issue recently. The solution was to register the ActionScript class with the one used in Java using `registerClassAlias`.
   
   I register all class aliases through a static method upon App initialization.
   
   Is the path to dbzDPRremarksSetupVO the same in Java and your Flex project? If so, the following should work. If not, correct the example below to include your actual java path.
   
   ```
   package some.path
   {
       import com.dbz.VO.INV.dbzDPRremarksSetupVO;
   
       public class RemoteClassesManager
       {
           public function RemoteClassesManager()
           {
               throw new Error("You cannot instantiate RemoteClassManager, as it has only static methods.");
           }
   
           public static function registerAllClasses():void
           {
               registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
   
               // Custom classes
               // registerClassAlias("full.java.path", AS_Class);
               registerClassAlias("com.dbz.VO.INV.dbzDPRremarksSetupVO", dbzDPRremarksSetupVO);
           }
       }
   }
   ```
   
   In your main Application:
   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <j:Application
       xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:j="library://ns.apache.org/royale/jewel"
       xmlns:js="library://ns.apache.org/royale/basic"
       . . .
       initialize="onInitialize(event)"
   ```
   
   ```
   private function onInitialize(event:Event):void
   {
       RemoteClassesManager.registerAllClasses();
   }
   ```
   Hope this helps.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org