import org.splat.kernel.MultiplyDefinedException;
import org.splat.service.ScenarioService;
import org.splat.service.SimulationContextService;
+import org.splat.wapp.Constants;
/**
* Action for creation of a new study.
*/
private ScenarioService _scenarioService;
- /**
- * Value of the menu property. It can be: none, create, open, study, knowledge, sysadmin, help.
- */
- private String _menuProperty;
-
- /**
- * Value of the tool bar property. It can be: none, standard, study, back.
- */
- private String _toolProperty;
-
- /**
- * Value of the left menu property. It can be: open, study, knowledge, scenario.
- */
- private String _leftMenuProperty;
-
// ==============================================================================================================================
// Action methods
// ==============================================================================================================================
_title = locale.getString("label.study") + " "
+ String.valueOf(number + 1);
- setMenuProperty("create");
- setToolProperty("none");
- setLeftMenuProperty("open");
- initializationFullScreenContext(_menuProperty, _toolProperty,
- _leftMenuProperty);
+ initializationFullScreenContext(Constants.CREATE_MENU, Constants.NONE,
+ Constants.OPEN);
return SUCCESS;
}
if (valid == 0) {
value = input[1].trim();
if (value.length() == 0) {
- setMenuProperty("create");
- initializationScreenContext(_menuProperty);
+ initializationScreenContext(Constants.CREATE_MENU);
return INPUT; // No need to reinitialize the list of existing products
}
}
number += 1;
open(study); // Opens the study,
- setMenuProperty("study");
- setToolProperty("none");
- setLeftMenuProperty("open");
- initializationFullScreenContext(_menuProperty, _toolProperty,
- _leftMenuProperty);
+ initializationFullScreenContext(Constants.STUDY_MENU,
+ Constants.NONE, Constants.OPEN);
return SUCCESS;
} catch (Exception error) {
LOG.error("Unable to save the study, reason:", error);
setErrorCode("message.error.newstudy");
- setMenuProperty("none");
- initializationScreenContext(_menuProperty);
+ initializationScreenContext(Constants.NONE);
return ERROR;
}
}
public void setScenarioService(final ScenarioService scenarioService) {
_scenarioService = scenarioService;
}
-
- /**
- * Get the menuProperty.
- *
- * @return the menuProperty
- */
- public String getMenuProperty() {
- return _menuProperty;
- }
-
- /**
- * Set the menuProperty.
- *
- * @param menuProperty
- * the menuProperty to set
- */
- public void setMenuProperty(final String menuProperty) {
- this._menuProperty = menuProperty;
- }
-
- /**
- * Get the toolProperty.
- *
- * @return the toolProperty
- */
- public String getToolProperty() {
- return _toolProperty;
- }
-
- /**
- * Set the toolProperty.
- *
- * @param toolProperty
- * the toolProperty to set
- */
- public void setToolProperty(final String toolProperty) {
- _toolProperty = toolProperty;
- }
-
- /**
- * Get the leftMenuProperty.
- *
- * @return the leftMenuProperty
- */
- public String getLeftMenuProperty() {
- return _leftMenuProperty;
- }
-
- /**
- * Set the leftMenuProperty.
- *
- * @param leftMenuProperty
- * the leftMenuProperty to set
- */
- public void setLeftMenuProperty(final String leftMenuProperty) {
- _leftMenuProperty = leftMenuProperty;
- }
}
\ No newline at end of file