I am trying to save a set of rows from list grid. I can do a bulk update on selected rows in list Grid and then hit save which makes a RPC call using RPCManager.
For some limited number of rows say about 400,440 the save call goes fine.
But for a a larger number of rows ( I get error on selecting 505 rows in grid) when i hit save I get following exception
*********************
com.isomorphic.rpc.ClientMustResubmitException:
at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:1180)
at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:270)
at com.ftid.evs.corp.webapp.hg.servlet.RPCHandler.doPost(RPCHandler.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:248)
*********************
the code in my js file which calls save is some thing like
where " modifiedWorksheetItems " is a JS array containing modified rows as objects in it.
In my server RPCHelper class we iterate through this "modifiedWorksheetItems" and create appropriate java objects and send it to our service which in turn saves all rows using some stored procedure.
This is my RPC request handling code
Any idea if this is a limit of data I can send in as dataMap.? or what is the problem here?
THanks
For some limited number of rows say about 400,440 the save call goes fine.
But for a a larger number of rows ( I get error on selecting 505 rows in grid) when i hit save I get following exception
*********************
com.isomorphic.rpc.ClientMustResubmitException:
at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:1180)
at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:270)
at com.ftid.evs.corp.webapp.hg.servlet.RPCHandler.doPost(RPCHandler.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:248)
*********************
the code in my js file which calls save is some thing like
Code:
saveAllEdits: function() { var lastSelectedRecord = theList.getSelectedRecord(); isc.showPrompt("Saving data..."); RPCManager.sendRequest({data: modifiedWorksheetItems, callback: "saveCallback(data,false)", actionURL: rpcHandlerPath + "/rpcRequest/saveMyData?action=saveSheetItems" + "¶m1=" + param1Val + "&userID=" + userID + "¶m2=" + param2Val + "&GroupID=" + GroupIdVal }); },
In my server RPCHelper class we iterate through this "modifiedWorksheetItems" and create appropriate java objects and send it to our service which in turn saves all rows using some stored procedure.
This is my RPC request handling code
Code:
else if("saveSheetItems".equalsIgnoreCase(action)) { /* get all necessary param1, param2 etc. */ Map dataMap = (Map)rpc.getData(); SortedMap<Long, Item> Items = new TreeMap<Long, Item>(); Item item; for(Object key : dataMap.keySet()) { Map value = (Map)dataMap.get(key); item = new Item(); DataTools.setProperties(value, item); if( item.getInstrumentID() != null ) { items.put(item.getInstrumentID(), item); } } ModelClass wsModel = new ModelClass(); List<WorkSheetItem> result = wsModel.saveItems(items, userId, param1,param2); logger.info("PERFORMANCE: EXITING RPCHandler action save items, DONE WITH SAVE ITEMS for " + result.size() + StringUtil.toDuration(System.currentTimeMillis() - t1)); rpc.send(result); }
THanks
Comment