diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/templates/labels/AssignedLabelsToTemplateController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/templates/labels/AssignedLabelsToTemplateController.java new file mode 100644 index 000000000..4e186d306 --- /dev/null +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/templates/labels/AssignedLabelsToTemplateController.java @@ -0,0 +1,54 @@ +/* + * This file is part of ###PROJECT_NAME### + * + * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e + * Desenvolvemento Tecnolóxico de Galicia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.navalplanner.web.templates.labels; + +import org.navalplanner.business.templates.entities.OrderElementTemplate; +import org.navalplanner.web.orders.labels.AssignedLabelsController; +import org.navalplanner.web.templates.IOrderTemplatesModel; + +/** + * @author Óscar González Fernández + * + */ +public class AssignedLabelsToTemplateController extends + AssignedLabelsController { + + private IAssignedLabelsToTemplateModel assignedLabelsToTemplateModel; + + private IOrderTemplatesModel templatesModel; + + @Override + protected OrderElementTemplate getElement() { + return templatesModel.getTemplate(); + } + + @Override + protected IAssignedLabelsToTemplateModel getModel() { + return assignedLabelsToTemplateModel; + } + + @Override + protected void setOuterModel(IOrderTemplatesModel templatesModel) { + this.templatesModel = templatesModel; + this.assignedLabelsToTemplateModel.setTemplatesModel(templatesModel); + } + + +} diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/templates/labels/LabelsAssignmentToTemplateComponent.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/templates/labels/LabelsAssignmentToTemplateComponent.java new file mode 100644 index 000000000..762717cbd --- /dev/null +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/templates/labels/LabelsAssignmentToTemplateComponent.java @@ -0,0 +1,38 @@ +/* + * This file is part of ###PROJECT_NAME### + * + * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e + * Desenvolvemento Tecnolóxico de Galicia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.navalplanner.web.templates.labels; + +import org.navalplanner.web.orders.labels.LabelsAssignmentComponent; + +/** + * @author Óscar González Fernández + * + */ +public class LabelsAssignmentToTemplateComponent extends + LabelsAssignmentComponent { + + private AssignedLabelsToTemplateController controller = new AssignedLabelsToTemplateController(); + + @Override + public AssignedLabelsToTemplateController getController() { + return controller; + } + +}