* It is necessary for correct building the title bar.
*/
private String _editDisabledProperty = "false";
+
+ /**
+ * Value of the tool bar property.
+ * It can be: none, standard, study, back.
+ */
+ private String _toolProperty;
// ==============================================================================================================================
// Action methods
setMenuProperty("study");
setTitleProperty("study");
- initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
+ if ("true".equals(getWriteAccess()) && getUserRights().canCreateDocument()) {
+ setToolProperty("study");
+ } else {
+ setToolProperty("standard");
+ }
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
return SUCCESS;
}
setMenuProperty("study");
setTitleProperty("study");
- initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
+ if ("true".equals(getWriteAccess()) && getUserRights().canCreateDocument()) {
+ setToolProperty("study");
+ } else {
+ setToolProperty("standard");
+ }
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
try {
User user = getConnectedUser();
setMenuProperty("study");
setTitleProperty("study");
- initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty);
+ if ("true".equals(getWriteAccess()) && getUserRights().canCreateDocument()) {
+ setToolProperty("study");
+ } else {
+ setToolProperty("standard");
+ }
+ initializationScreenContext(_menuProperty, _titleProperty, _editDisabledProperty, _toolProperty);
return SUCCESS;
}
* @param menuProperty
* the menuProperty to set
*/
- public void setMenuProperty(String menuProperty) {
+ public void setMenuProperty(final String menuProperty) {
this._menuProperty = menuProperty;
}
}
/**
- * Set the _titleProperty.
- * @param _titleProperty the titleProperty to set
+ * Set the titleProperty.
+ * @param titleProperty the titleProperty to set
*/
- public void setTitleProperty(String titleProperty) {
+ public void setTitleProperty(final String titleProperty) {
_titleProperty = titleProperty;
}
* Get the editDisabledProperty.
* @return the editDisabledProperty
*/
- public final String getEditDisabledProperty() {
+ public String getEditDisabledProperty() {
return _editDisabledProperty;
}
* Set the editDisabledProperty.
* @param editDisabledProperty the editDisabledProperty to set
*/
- public final void setEditDisabledProperty(String editDisabledProperty) {
+ public void setEditDisabledProperty(final String editDisabledProperty) {
_editDisabledProperty = editDisabledProperty;
}
+ /**
+ * 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;
+ }
+
}
\ No newline at end of file