Hi,
I am very new to Grid.
I am trying to use the same in jsp.
I will try to explain my code flow.
// Structure
I have a jsp which loads grid from XML.
Grid has two editable columns.
One button is given for Save.
Code sniplet as below
function onLoad()
{
// New instance of grid
dhtmlGrid = new DHTMLGrid(‘configurationHTMLGrid’, “NOAction”); // wrapper on Grid
dhtmlGrid.loadXMLString();
// Map the grid with data processor
gridDataProcessor = new dataProcessor("ConfigurationTool.do);
gridDataProcessor.setUpdateMode(“off”);
gridDataProcessor.setTransactionMode(“POST”, true)
gridDataProcessor.setDataColumns([ false, true, true, true, true, false ]);
gridDataProcessor.enableDataNames(true);
gridDataProcessor.init(dhtmlGrid.grid);
}
function fnSave()
{
gridDataProcessor.sendData();
}
// Code flow
A node in application calls jsp
Jsp gets XML from a Tag. A hidden Textarea is created.
loadXMLString loads grid and UI is displayed.
Now when I change any field and click on Save Button,
Data is transmitted to Struts action class.
here i do data operations, commit the same and then Forward the struts action
to same JSP.
But I get error
Error Type: LoadXML
Description: Incorrect XML.
But when I click on a node which opens the jsp (same node mentioned above)
Updated Grid is displayed.
Can anyone please help.