Categories | Question details Back To List | ||||||||
The value of one dhxCalendarA column reaches as empty string to server Hi, I'm using the standard version of dhtmlxgrid along with dataprocessor to synchronized the database with the grid. My grid initialization is as follows: --------------------------------------------------------------------------------------------------------------- var mygrid, dp; function doInitGrid() { mygrid = new dhtmlXGridObject('reminderGrid'); mygrid.setImagePath("dhtmlxgrid_std_full/imgs/"); mygrid .setHeader(",Identifiers,Type,Description,Due Date,Given Date,Comments"); mygrid .setColumnIds("del,identifiers,type,description,dueDate,givenDate,comments"); mygrid.setColTypes("ch,ro,ro,ro,dhxCalendarA,dhxCalendarA,txt"); mygrid.setInitWidths("20,0,150,200,80,80,*"); mygrid.setColAlign("center,left,left,left,left,left,left"); mygrid.setColSorting("int,str,str,str,date,date,str"); mygrid.enableMultiselect(true); mygrid.setSkin("dhx_skyblue"); mygrid.init(); var count = mygrid.getRowsNum(); var patientId = document.getElementById('patientId').value; var url = "LoadSavedReminders.do?patientId=" + patientId + "&count=" + count; mygrid.load(url); } function doInitDataProcessor() { dp = new dataProcessor("SaveReminders.do"); dp.init(mygrid); dp.setTransactionMode("POST"); dp.enableDataNames(true); } --------------------------------------------------------------------------------------------------------------- When the data is loaded the "Due Date" column is set to some value, where as "Given Date" is kept empty to be filled later. However, when the value for "Given Date" is set, the value doesn't reach the server side. It is empty. Thus also couldn't update the database. My server-side code is as follows: --------------------------------------------------------------------------------------------------------------- String grid_rowId = request.getParameter(GRID_ROW_ID); String identifiers = request.getParameter(IDENTIFIERS); String ids[] = identifiers.split("-"); String patientId = ids[0]; String reminderTypeId = ids[1]; String reminderId = ids[2]; String actualReminderId = ids[3]; String operationStatus = request.getParameter(NATIVE_EDITOR_STATUS); String dueDate = request.getParameter(DUE_DATE); String givenDate = request.getParameter(GIVEN_DATE); // Empty value is received String comments = request.getParameter(COMMENTS); SaveReminderBizLogic saveReminderBizLogic = new SaveReminderBizLogic(); StringBuffer responseXML = new StringBuffer("<data>"); try { if ("inserted".equals(operationStatus)) { responseXML.append(getResponse("insert", grid_rowId, grid_rowId, null)); } else if ("updated".equals(operationStatus)) { saveReminderBizLogic.updateReminder(patientId, reminderTypeId, reminderId, actualReminderId, dueDate, givenDate, comments); responseXML.append(getResponse("update", grid_rowId, grid_rowId .toString(), null)); } else if ("deleted".equals(operationStatus)) { saveReminderBizLogic.deleteReminder(actualReminderId); responseXML.append(getResponse("delete", grid_rowId, grid_rowId, null)); } } catch (BizLogicException e) { responseXML.append(gnetResponse("error", grid_rowId, grid_rowId, null)); e.printStackTrace(); } responseXML.append("</data>"); response.setContentType(XML_CONTENT_TYPE); response.getWriter().write(responseXML.toString()); --------------------------------------------------------------------------------------------------------------- Please let me know, if I'm missing something or doing anything wrong. Thanks, Chetan Answer posted by dhxSupport on Dec 17, 2009 02:38 What version of dhtmlxGrid do you use? Similar issue was fixed at the 91111 build. Also you can try to use debug version of dhtmlxdataprocessor.js to check what requests does DataProcessor send to the server side. Please find more information here http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxdataprocessor:debug_mode Answer posted on Dec 17, 2009 23:55 I'm using dhtmlxgrid v.2.5 Standard Edition. As per your suggestion I used the dataprocessor_debug.js to see what parameters are passed to the server. The debug window showed no sign of error, plus it clearly shows that the value of date column, "Given Date" is not passed to the server via request. Please have a look at the attached screenshot. I tried to put the value for Given Date column of 2nd row. Please help us to resolve this issue. Thanks, Chetan Attachments (1)
Answer posted on Dec 18, 2009 02:08 This issue was fixed at the 9111 build (dhtmlxGrid ver 2.5 SP2). Please update your files. http://dhtmlx.com/docs/download.shtml |