I'm just running a daily sdk build now and will test soon. I don't see an empty String encoding test in the suite at the moment, so I will add one and check.
I can check this now, but if you ever want to add tests, you can do it in here [1] If you add a failing test with [Ignore] feel free to assign it to me. 1. https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/Network/src/test/royale/flexUnitTests/network/AMFBinaryDataTesterTest.as On Sat, Nov 9, 2019 at 7:22 AM Alex Harui <aha...@adobe.com> wrote: > I did a find-in-files on their code and only saw one reference to SanType, > where it is initialized in the VO. This implies that no other code is > setting it. My next task is to try to verify that by looking at the actual > VO in the debugger before serialization. > > > > I haven’t looked at the AMF code in a long time, but I’m assuming it is > using Reflection instead of testing the value to determine its type. But, > IIRC, the following all go down the false path and don’t trace anything in > JS (and AS) > > > > Var bar:String = “”; if (bar) trace(‘bar’); > > Var foo:int = 0; if (foo) trace(‘foo’); > > > > So I wouldn’t be surprised if we have some code that should be using === > that isn’t and we’re going down the wrong code path for an empty string. > > > > -Alex > > > > *From: *Greg Dove <greg.d...@gmail.com> > *Date: *Friday, November 8, 2019 at 9:55 AM > *To: *Alex Harui <aha...@adobe.com> > *Cc: *Apache Royale Development <d...@royale.apache.org>, " > users@royale.apache.org" <users@royale.apache.org> > *Subject: *Re: dropdownlist selectedItem.id to VO property > > > > > I guess I do have one other slightly random question... trying to think > how that could be happening at the amf level. I notice this is in module > code. Is there any chance that the same VO class is present in another > module with a slightly different definition (e.g. Number typing of that > same field)? It's a long shot, but it would be good to rule out something > unusual like that. > > > > > > On Sat, Nov 9, 2019 at 6:11 AM Greg Dove <greg.d...@gmail.com> wrote: > > > I can't really be too sure about how things are working without seeing the > code, but I am assuming the following: a DDL (also called 'ad_SanType' in > the dbzAdjustmentTypeSetup View Class) is setting the 'ad_SanType' value on > an instance of the VO, and that the instance of the VO is used in a > remoting call to send to java side. > > The '0.0' makes me wonder if a formatter is being used somewhere. > > > > Anyway I will look at the AMF testing for int/Number very shortly. > > > > > > > > On Sat, Nov 9, 2019 at 5:59 AM Alex Harui <aha...@adobe.com> wrote: > > Good that you noticed it is a string. For some reason I thought I saw > int. Anyway, so far, I haven’t seen any place in the app that changes that > value, so I guess she’s claiming that an empty string is getting serialized > as “0.0”. > > > > I will try to see if that value is being set to something other than empty > string at serialization time. > > > > -Alex > > > > *From: *Greg Dove <greg.d...@gmail.com> > *Date: *Friday, November 8, 2019 at 7:48 AM > *To: *Alex Harui <aha...@adobe.com> > *Cc: *Apache Royale Development <d...@royale.apache.org>, " > users@royale.apache.org" <users@royale.apache.org> > *Subject: *Re: dropdownlist selectedItem.id to VO property > > > > I am afk atm but can check that for sure in a few hours time. However, > looking at that VO js output code... 'ad_SanType' appears to be a String > typed field on the VO? In fact all of them are String types. Is that > correct? If yes, is it getting assigned '0.0' (string) as its value > somewhere? > > On Fri, 8 Nov 2019, 21:41 Alex Harui, <aha...@adobe.com> wrote: > > @Greg Dove Is there a test that an int with the value 0 is properly > serialized by AMF as 0 and not 0.0? > > -Alex > > On 11/7/19, 11:21 PM, "Alina Kazi" <alina.k...@d-bz.com> wrote: > > Hi Alex, > > Launch : > Module : Inventory (Inventory from select in Menu) > Go to Adjustment Types (from Setups in Menu) > Click save button on Adjustment Types setup to test the scenario and > system will call validateForm server side method. Value of 'ad_SanType' > will be 0.0 and it should be "0" > On server side we have put breakpoint on validateForm. You will see > the change value on server side(java). > > Files : > > D:\DBIZSOL\Main\Royale\src\com\dbz\modules\INV\dbzAdjustmentTypeSetup.mxml > D:\DBIZCOMLIB\src\com\dbz\VO\INV\dbzAdjustmentTypeSetupVO.as > > Regards, > Alina Kazi > > -----Original Message----- > From: Alex Harui [mailto:aha...@adobe.com.INVALID] > Sent: Thursday, November 7, 2019 2:09 PM > To: d...@royale.apache.org; users@royale.apache.org > Subject: Re: dropdownlist selectedItem.id to VO property > > What file contains the: > > org.apache.royale.utils.Language.as > <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Forg.apache.royale.utils.Language.as&data=02%7C01%7Caharui%40adobe.com%7C470c17ff5f7a4127c37508d76474d063%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637088325193910487&sdata=ei8vdE2ZN6sW1cSOLm2rwnpBkXQLJj%2Fbk671qo8ELNI%3D&reserved=0> > (this.dbzAdjustmentTypeSetup_valueObj, > com.dbz.VO.INV.dbzAdjustmentTypeSetupVO) > > and what does that source code look like? > > -Alex > > On 11/7/19, 4:04 AM, "Alina Kazi" <alina.k...@d-bz.com> wrote: > > Hi, > > > > We have a custom vo dbzAdjustmentTypeSetupVO > > > > When we send it to java side from royale side system change its > value on > line : > > org.apache.royale.utils.Language.as > <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Forg.apache.royale.utils.Language.as&data=02%7C01%7Caharui%40adobe.com%7C470c17ff5f7a4127c37508d76474d063%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637088325193920477&sdata=%2B%2FKE55wAQ4wEhnLYdK1oXwMou%2Fs5PiT2Sl2SC70g6D8%3D&reserved=0> > (this.dbzAdjustmentTypeSetup_valueObj, > com.dbz.VO.INV.dbzAdjustmentTypeSetupVO) > > dbzAdjustmentTypeSetupVO file is > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fwonx1&data=02%7C01%7Caharui%40adobe.com%7Ce877a2f0308643d67a0f08d7641c38c1%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637087944683475841&sdata=ilPgLulQq6MZGdTg5XN%2F3upVTUZ8EZOxvE73Q3NNt04%3D&reserved=0 > <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fwonx1&data=02%7C01%7Caharui%40adobe.com%7C470c17ff5f7a4127c37508d76474d063%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637088325193930476&sdata=a5bfRauqqx22dSE1TvRtTwTFsBo6vNICLXspwO%2F6NNs%3D&reserved=0> > > its property ad_SanType is 0 and it becomes 0.0 after the > execution of line > org.apache.royale.utils.Language.as > <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Forg.apache.royale.utils.Language.as&data=02%7C01%7Caharui%40adobe.com%7C470c17ff5f7a4127c37508d76474d063%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637088325193930476&sdata=kVViWNxpiUx4inlHrjq3fRNyMDoD7ZDY7eNxFZUrzNE%3D&reserved=0> > (this.dbzAdjustmentTypeSetup_valueObj, > com.dbz.VO.INV.dbzAdjustmentTypeSetupVO) > > > > 'ad_SanType': { type: 'spark.components.DropDownList', access: > 'readwrite', > declaredBy: 'dbzAdjustmentTypeSetup'} > > 'ad_SanType' is a dropdownlist though all our properties in > dbzAdjustmentTypeSetupVO were of string type. > > > > -Alina > > > > > > > >