ItEr46S04ValidacionEProbasFuncionaisItEr45S04: Fixing problem when moving a milestone.
Avoiding to show the resources text for a milestone since it doesn't suppor it.
This commit is contained in:
parent
901a8300f1
commit
889027d2ea
3 changed files with 19 additions and 1 deletions
|
|
@ -33,4 +33,9 @@ public class MilestoneComponent extends TaskComponent {
|
|||
super(task, disabilityConfiguration);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canShowResourcesText() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,16 +203,26 @@ public class TaskComponent extends Div implements AfterCompose {
|
|||
|
||||
@Override
|
||||
public void reloadResourcesTextRequested() {
|
||||
smartUpdate("resourcesText", getResourcesText());
|
||||
if (canShowResourcesText()) {
|
||||
smartUpdate("resourcesText", getResourcesText());
|
||||
}
|
||||
String cssClass = isSubcontracted() ? "box subcontracted-task"
|
||||
: "box standard-task";
|
||||
response("setClass", new AuInvoke(TaskComponent.this,
|
||||
"setClass", cssClass));
|
||||
}
|
||||
|
||||
};
|
||||
this.task.addReloadListener(reloadResourcesTextRequested);
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: This method is intended to be overridden.
|
||||
*/
|
||||
protected boolean canShowResourcesText() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String calculateClass() {
|
||||
String classText;
|
||||
if (getSclass().equals("null")) {
|
||||
|
|
|
|||
|
|
@ -359,6 +359,9 @@ public class TaskElementAdapter implements ITaskElementAdapter {
|
|||
|
||||
@Override
|
||||
public String getResourcesText() {
|
||||
if (taskElement.getOrderElement() == null) {
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
return transactionService
|
||||
.runOnAnotherReadOnlyTransaction(new IOnTransaction<String>() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue