I have built a Spring WebMVC App with Primefaces. This app contains a list of nodes which can be dragged into the spreadSheet (I m working with SpreadJS). Behind each node there is a model and a bean. Evey node has a name and an input type. For example the node can be comboBox or simple input or input date ... . I need to do the synchronization between the node value and its value in the spreadSheet and aim-versa (communication between the primefaces component and spreadJS). for that i decide to load the spread from a json file. i didn t find the best way to do this communication because i can not add a parameter to the json file to add the id of the node after dragging it and when i change the json (which is server side), the refresh of the spreadSheet can t detect the changes that i made in the json file. How can i do this synchrnisation ?
Thanks in advance.
This is the function which load the spreadSheet from the json:
window.onload = function() {
spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var sheet = spread.getActiveSheet();
$.ajax({
url: "spread.json",
datatype: "json",
success: function (data) {
spread.fromJSON(JSON.parse(data));
},
error: function (ex) {
alert('Exception:' + ex);
}
});
};
Please find the example below :
How to synchronise the value of the input with its cell in the spreadSheet ?
Thanks in advance.