ItEr41S20CUGravacionModelosUnidadesTraballoItEr40S25: Adding edition operation for existing templates
This commit is contained in:
parent
679d5a8c49
commit
75df67ebdd
4 changed files with 19 additions and 0 deletions
|
|
@ -37,4 +37,6 @@ public interface IOrderTemplatesModel {
|
|||
OrderElementTemplate getTemplate();
|
||||
|
||||
void confirmSave();
|
||||
|
||||
void initEdit(OrderElementTemplate template);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,11 @@ public class OrderTemplatesController extends GenericForwardComposer implements
|
|||
show(getEditWindow());
|
||||
}
|
||||
|
||||
public void goToEditForm(OrderElementTemplate template) {
|
||||
model.initEdit(template);
|
||||
show(getEditWindow());
|
||||
}
|
||||
|
||||
private void show(Component window) {
|
||||
Util.reloadBindings(window);
|
||||
getVisibility().showOnly(window);
|
||||
|
|
|
|||
|
|
@ -79,4 +79,10 @@ public class OrderTemplatesModel implements IOrderTemplatesModel {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public void initEdit(OrderElementTemplate template) {
|
||||
this.template = dao.findExistingEntity(template.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@
|
|||
<label value="@{template.deadlineAsDaysFromBeginning}" />
|
||||
<label value="@{template.description}" />
|
||||
<hbox>
|
||||
<button sclass="icono"
|
||||
image="/common/img/ico_editar1.png"
|
||||
hoverImage="/common/img/ico_editar.png"
|
||||
tooltiptext="${i18n:_('Edit')}"
|
||||
onClick="templateController.goToEditForm(self.parent.parent.value);">
|
||||
</button>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue