cmd.toArray(new String[] {}), null,
new File(SALOME_HOME));
- // Refresh the current scenario view
- getAppletContext().showDocument(
- new URL(this.getParameter("refresh")));
-
BufferedReader bri = new BufferedReader(new InputStreamReader(
proc.getInputStream()));
BufferedReader bre = new BufferedReader(new InputStreamReader(
}
showError(response);
}
+
+ // Refresh the current scenario view
+ getAppletContext().showDocument(
+ new URL(this.getParameter("refresh")));
} else {
extensions = "[" + extensions.replaceAll("\\|\\|", "") + "]";
showError("SALOME module is not found: " + pathToScript
if (_myindex == null) {
if (_selection == null) { // Opening a study just newed
_selection = _openStudy.getSelection(); // Default selection
- }
- // Re-opening (refreshing) the currently open study
- _openStudy = open(getStudyService().selectStudy(
- _openStudy.getIndex())); // Closes the previously open study
- _openStudy.setSelection(_selection);
+ }
+ if(_openStudy.getStudyObject() == null) {
+ // Nothing to open or re-open
+ res = ERROR;
+ } else {
+ // Re-opening (refreshing) the currently open study
+ _openStudy = open(getStudyService().selectStudy(
+ _openStudy.getIndex())); // Closes the previously open study
+ _openStudy.setSelection(_selection);
+ }
} else {
try { // Opening a study from the search result
int index = Integer.valueOf(_myindex);
public void setGlobalResultActionName(final String globalResultActionName) {
_globalResultActionName = globalResultActionName;
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
+ */
+ public String intercept(final ActionInvocation invocation) throws Exception { //NOPMD: RKV: because of struts invoke() method
+ String result = super.intercept(invocation);
+ if (result.equals(getGlobalResult())) { //Redirect happened
+ ((Action)invocation.getAction()).setMessage("");
+ }
+ return result;
+ }
/**
* {@inheritDoc}