Revision 1a836a82
Added by Andreas Kohlbecker almost 6 years ago
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java | ||
---|---|---|
81 | 81 |
public abstract class AbstractPopupEditor<DTO extends Object, P extends AbstractEditorPresenter<DTO, ? extends ApplicationView>> |
82 | 82 |
extends AbstractPopupView<P> { |
83 | 83 |
|
84 |
/** |
|
85 |
* |
|
86 |
*/ |
|
87 |
private static final String READ_ONLY_MESSAGE_TEXT = "The editor is in read-only mode. Your authorities are not sufficient to edit this data."; |
|
88 |
|
|
84 | 89 |
public static final Logger logger = Logger.getLogger(AbstractPopupEditor.class); |
85 | 90 |
|
86 | 91 |
private BeanFieldGroup<DTO> fieldGroup; |
... | ... | |
206 | 211 |
@Override |
207 | 212 |
public void setReadOnly(boolean readOnly) { |
208 | 213 |
super.setReadOnly(readOnly); |
214 |
if(readOnly){ |
|
215 |
statusMessageLabel.setValue(READ_ONLY_MESSAGE_TEXT); |
|
216 |
statusMessageLabel.addStyleName(ValoTheme.LABEL_COLORED); |
|
217 |
} else { |
|
218 |
statusMessageLabel.setValue(null); |
|
219 |
} |
|
220 |
statusMessageLabel.setVisible(readOnly); |
|
209 | 221 |
save.setVisible(!readOnly); |
210 | 222 |
delete.setVisible(!readOnly); |
211 | 223 |
cancel.setCaption(readOnly ? "Close" : "Cancel"); |
Also available in: Unified diff
readonly notification in editors