try {
iter = upload.getItemIterator(request);
- /* ATM this loop is run only once as we are uploading one file per
- * request.
+ /*
+ * ATM this loop is run only once as we are uploading one file per
+ * request.
*/
while (iter.hasNext()) {
FileItemStream item = iter.next();
};
- // tell UploadProgressListener which component is receiving file
+ // tell UploadProgressListener which component is receiving
+ // file
pl.setUpload(uploadComponent);
-
+
uploadComponent.receiveUpload(upstream);
}
}
boolean repaintAll = (request.getParameter(GET_PARAM_REPAINT_ALL) != null)
|| request.getSession().isNew();
+ // If repaint is requested, clean all ids
+ if (repaintAll) {
+ idPaintableMap.clear();
+ paintableIdMap.clear();
+ }
+
OutputStream out = response.getOutputStream();
PrintWriter outWriter = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(out, "UTF-8")));
outWriter.print("\"changes\":[");
- paintTarget = new JsonPaintTarget(this, outWriter, !repaintAll);
+ paintTarget = new JsonPaintTarget(this, outWriter,
+ !repaintAll);
// Paints components
Set paintables;
return paintableIdMap.containsKey(paintable);
}
-
+
/**
*
* @return
*/
private class UploadProgressListener implements ProgressListener {
Upload uploadComponent;
+
boolean updated = false;
public void setUpload(Upload u) {