#32 Perfil de Personal Administrativo - VER Documento
This commit is contained in:
parent
45987ccad9
commit
f3bda474d0
@ -157,8 +157,20 @@ public class DocumentView extends BeanValidationForm<Document> implements HasUrl
|
|||||||
UUID documentId = UUID.fromString(s);
|
UUID documentId = UUID.fromString(s);
|
||||||
var document = documentService.getDocument(documentId);
|
var document = documentService.getDocument(documentId);
|
||||||
setEntityWithEnabledSave(document);
|
setEntityWithEnabledSave(document);
|
||||||
|
|
||||||
|
if ("edit".equals(action) && !s.isEmpty()) {
|
||||||
|
setFieldsReadOnly(false);
|
||||||
|
} else if ("view".equals(action) && !s.isEmpty()) {
|
||||||
|
setFieldsReadOnly(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setFieldsReadOnly(final boolean option) {
|
||||||
|
fileName.setReadOnly(option);
|
||||||
|
documentType.setReadOnly(option);
|
||||||
|
employeeComboBox.setReadOnly(option);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Component> getFormComponents() {
|
protected List<Component> getFormComponents() {
|
||||||
|
Loading…
Reference in New Issue
Block a user