I have a long-running task that retrieves data by calling a RPG program
on an IBM AS400 through the server. This task is initiated by a button
click. When the button is clicked I would like to change the text of
some ULCLabels on the current screen and also display a new ULCFrame
with a wait message. With the code below the labels are not changed and
the frame not displayed until after the long-running task has completed.
How can I force the display to change on the client before the
long-running task begins?
Thanks,
Brian
btnExport.addActionListener(new
com.ulcjava.base.application.event.IActionListener() {
public void
actionPerformed(com.ulcjava.base.application.event.ActionEvent e) {
ULCFrame waitMsg = new ULCFrame("Please Wait");
waitMsg.setBounds(100, 100, 300, 200);
waitMsg.setVisible(true);
labelCurrentASN.setText("");
labelASNDate.setText("");
labelASNDescription.setText("");
UserSpaceExport asnExport = new UserSpaceExport(appVars);
asnExport.setStrRFMLrec("asnRec");
asnExport.setStrCriteria(getStrCriteria(true));
String id = DownloadManager.INSTANCE.put(asnExport);
try {
DownloadManager.INSTANCE.showDocument(id, "template");
}
catch(IOException ioe){
new ULCAlert("Error Message - FinInqAsnLkup","Cannot open
spreadsheet: " + ioe,"OK").show();
}
}
});
<This message has been scanned for viruses by a Barracuda Spam Firewall.>