Hugo A. Cantor
10-05-2010, 09:32 AM
Hello,
vvOut_toJSON seems to be producing invalid JSON when vvOut.columnData is set to ‘Y’. I made a copy of program EXGRIDPGKY and set vvOut.columnData to ‘Y’ right before the call to vvOut_toJSON. I tested the program via the new "Test RPG Call" (great feature by the way) . The results showed two consecutive double quotes before the ‘sortable’ attributes of each of the column field objects within the "columns" array and a semicolon at the end of the "columns" array. Below is the part of the JSON response. I've attempted to set the color of the first two consecutive double qoutes and the semicolon to red.
Removing one of the DQ in the source of VVCODE's vvCode_columnModel procedure on line 115 and adding vvCode.withinComponent = 'Y' to vvOut_toJson right before the call to vvCode_columnModel fixed the problem.
-thanks
{"morePrev":"0","moreNext":"1","columns":[{"header":"<b>Cust#</b>","width":66,""sortable":true,"dataIndex":"CUSNO"},{"header":"<b>Customer Name</b>","width":225,""sortable":true,"dataIndex":"CNAME"},{"header":"<b>Cust Addr: Line 1</b>","width":225,""sortable":true,"dataIndex":"CADDR1"},{"header":"<b>Cust Addr: Line 2</b>","width":225,""sortable":true,"dataIndex":"CADDR2"},{"header":"<b>City</b>","width":175,""sortable":true,"dataIndex":"CCITY"},{"header":"<b>State</b>","width":55,""sortable":true,"dataIndex":"CSTATE"},{"header":"<b>Country</b>","width":140,""sortable":true,"dataIndex":"CCOUNTRY"},{"header":"<b>Zip</b>","width":110,""sortable":true,"dataIndex":"CZIP"},{"header":"<b>YTD Sales</b>","width":121,""sortable":true,"dataIndex":"CYTDSALES"},{"header":"<b>Activity Dt</b>","width":121,""sortable":true,"dataIndex":"CLASTACT"} ];,"DEMOCMAST":
vvOut_toJSON seems to be producing invalid JSON when vvOut.columnData is set to ‘Y’. I made a copy of program EXGRIDPGKY and set vvOut.columnData to ‘Y’ right before the call to vvOut_toJSON. I tested the program via the new "Test RPG Call" (great feature by the way) . The results showed two consecutive double quotes before the ‘sortable’ attributes of each of the column field objects within the "columns" array and a semicolon at the end of the "columns" array. Below is the part of the JSON response. I've attempted to set the color of the first two consecutive double qoutes and the semicolon to red.
Removing one of the DQ in the source of VVCODE's vvCode_columnModel procedure on line 115 and adding vvCode.withinComponent = 'Y' to vvOut_toJson right before the call to vvCode_columnModel fixed the problem.
-thanks
{"morePrev":"0","moreNext":"1","columns":[{"header":"<b>Cust#</b>","width":66,""sortable":true,"dataIndex":"CUSNO"},{"header":"<b>Customer Name</b>","width":225,""sortable":true,"dataIndex":"CNAME"},{"header":"<b>Cust Addr: Line 1</b>","width":225,""sortable":true,"dataIndex":"CADDR1"},{"header":"<b>Cust Addr: Line 2</b>","width":225,""sortable":true,"dataIndex":"CADDR2"},{"header":"<b>City</b>","width":175,""sortable":true,"dataIndex":"CCITY"},{"header":"<b>State</b>","width":55,""sortable":true,"dataIndex":"CSTATE"},{"header":"<b>Country</b>","width":140,""sortable":true,"dataIndex":"CCOUNTRY"},{"header":"<b>Zip</b>","width":110,""sortable":true,"dataIndex":"CZIP"},{"header":"<b>YTD Sales</b>","width":121,""sortable":true,"dataIndex":"CYTDSALES"},{"header":"<b>Activity Dt</b>","width":121,""sortable":true,"dataIndex":"CLASTACT"} ];,"DEMOCMAST":