- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Save screen data
In some situations, you want to save the data you have on screen without persisting it in like the data base. Here you have examples of methods how you can store the current mapdata in the sessionWorkspace.
private void getTempScreenData () {
//Get possible screen data from temp
MapData screenMD = (MapData) sessionWorkspace.getTemp(MAPDATA_SCREEN);
if (screenMD != null && screenMD.containsVariables()) {
mapData.putAll(screenMD);
}
}
private void saveTempScreenData() {
// Add screen data to mapdata and store in temp
MapData screenMD = (MapData) mapData.clone();
screenMD.putAll(getDataInstance().rowToMapData(DMG, 1));
sessionWorkspace.setTemp(MAPDATA_SCREEN, screenMD);
}
private void deleteTempScreenData() {
sessionWorkspace.setTemp(MAPDATA_SCREEN, null);
}
Was this article helpful?