It seems that the new FiscalCalendar feature is causing a problem with my DateItems. I can edit a record with the DateItem once, but subsequent attempts to edit any other record (or the same record for that matter) yield the following JS stack trace
If I just remove the following from my EntryPoint, the problem goes away.
SNAPSHOT_v8.3d_2012-09-05/PowerEdition Deployment (built 2012-09-05)
Tested with Firefox 14, 15 & IE 9.
Thoughts?
Code:
10:34:31.752:MUP3:WARN:Log:TypeError: _3[i].startDate is undefined Stack from error.stack: unnamed(isc_Date__getFiscalYearObjectForDat) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:818 unnamed(isc_Date_getFiscalYea) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:826 unnamed(isc_Dat_getFiscalYea) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:858 unnamed(isc_DateGrid_getWeekRecor) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:140 unnamed(isc_DateGrid_buildCalendarDat) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:137 unnamed(isc_DateGrid_setStartDat) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:135 unnamed(isc_DateChooser_setDat) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:164 unnamed(isc_DateItem_showPicke) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:2812 unnamed() @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:1175 unnamed(isc_FormItem__iconClic) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:1676 unnamed(isc_DynamicForm_handleClic) @ ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js:778 unnamed(isc_c_EventHandler_bubbleEven) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:1872 unnamed(isc_c_EventHandler_handleClic) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:1700 unnamed(isc_c_EventHandler__handleMouseU) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:1686 unnamed(isc_c_EventHandler_handleMouseU) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:1677 unnamed(isc_c_EventHandler_dispatc) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:1934 unnamed(anonymou) @ ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js:63 unnamed() @
Code:
DataSource calendarYearDS = DataSource.get(IslandPacificDSConstants.DATASOURCE_CalendarYear); calendarYearDS.fetchData(null, new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { IPGui.calendarYears = new TreeMap<Date, Integer>(); FiscalYear[] fiscalYears = new FiscalYear[response.getData().length]; int count = 0; for (Record year : response.getData()) { Date startDate = year.getAttributeAsDate(CalendarYear.START_DATE); IPGui.calendarYears.put(startDate, year.getAttributeAsInt(CalendarYear.YEAR)); FiscalYear fiscalYear = new FiscalYear( year.getAttributeAsInt(CalendarYear.START_YEAR), year.getAttributeAsInt(CalendarYear.START_MONTH)-1, year.getAttributeAsInt(CalendarYear.START_DAY)); fiscalYear.setFiscalYear(year.getAttributeAsInt(CalendarYear.YEAR)); fiscalYears[count++] = fiscalYear; } // Set the fiscal calendar so the date picker shows year/week numbers. int lastYear = fiscalYears.length-1; FiscalCalendar fiscalCalendar = new FiscalCalendar( fiscalYears[lastYear].getMonth(), fiscalYears[lastYear].getDate()); fiscalCalendar.setFiscalYears(fiscalYears); fiscalCalendar.setDefaultYearMode(FiscalYearMode.END); DateUtil.setFiscalCalendar(fiscalCalendar); DateUtil.setShowChooserFiscalYearPickers(true); DateUtil.setShowChooserWeekPickers(true); } });
Tested with Firefox 14, 15 & IE 9.
Thoughts?
Comment