Regarding FLUID-3824, preserve policy

Wong, Harris hwong at ocad.ca
Thu Nov 11 16:04:53 UTC 2010


Hi,

I was working on FLUID-3824 (http://issues.fluidproject.org/browse/FLUID-3824) and I came across one problem with the preserve policy

After some debugging, the Sakai demo (infusion/src/webapp/integration-demos/sakai/html/pager-site-setting.html) fails to run because the pageSize is not set.  I found that it's not set because the default values from Pager.js line 765-769 didn't get merged with the demo's constructor model.

Pager.js line 765-769
 model: {
            pageIndex: undefined,
            pageSize: 10,
            totalRange: undefined
        },

site_setting_members.js line 86-88
model: {
            pageIndex: 3
        },


The merge should become
 model: {
            pageIndex: 3,
            pageSize: 10,
            totalRange: undefined
        },

but is actually returning
 model: {
            pageIndex: 3
        },

I think this is caused by the preserve policy which Fluid.js condition going false on line 536.

Should I fix this by changing:
site_setting_members.js line 86-88
model: {
            pageSize: 10,
            pageIndex: 3
        },
or is there another way to do it regarding to the preserve policy?


Thanks,
Harris



More information about the fluid-work mailing list