mandatoryLabel inserted in content
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
@@ -92,6 +92,8 @@ public class SoftwareModuleAddUpdateWindow extends CustomComponent implements Se
|
|||||||
|
|
||||||
private Long baseSwModuleId;
|
private Long baseSwModuleId;
|
||||||
|
|
||||||
|
private FormLayout formLayout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create window for new software module.
|
* Create window for new software module.
|
||||||
*
|
*
|
||||||
@@ -207,7 +209,7 @@ public class SoftwareModuleAddUpdateWindow extends CustomComponent implements Se
|
|||||||
*/
|
*/
|
||||||
addStyleName("lay-color");
|
addStyleName("lay-color");
|
||||||
|
|
||||||
final FormLayout formLayout = new FormLayout();
|
formLayout = new FormLayout();
|
||||||
formLayout.setCaption(null);
|
formLayout.setCaption(null);
|
||||||
formLayout.addComponent(typeComboBox);
|
formLayout.addComponent(typeComboBox);
|
||||||
formLayout.addComponent(nameTextField);
|
formLayout.addComponent(nameTextField);
|
||||||
@@ -369,4 +371,8 @@ public class SoftwareModuleAddUpdateWindow extends CustomComponent implements Se
|
|||||||
return !(event.getText().equals(oldVendorValue) && descTextArea.getValue().equals(oldDescriptionValue));
|
return !(event.getText().equals(oldVendorValue) && descTextArea.getValue().equals(oldDescriptionValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FormLayout getFormLayout() {
|
||||||
|
return formLayout;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,11 @@ import java.io.Serializable;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.eclipse.hawkbit.ui.artifacts.smtable.SoftwareModuleAddUpdateWindow;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleBorderWithIcon;
|
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleBorderWithIcon;
|
||||||
|
import org.eclipse.hawkbit.ui.layouts.AbstractCreateUpdateTagLayout;
|
||||||
|
import org.eclipse.hawkbit.ui.management.targettable.TargetAddUpdateWindowLayout;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIComponentIdProvider;
|
import org.eclipse.hawkbit.ui.utils.SPUIComponentIdProvider;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||||
@@ -224,9 +227,18 @@ public class CommonDialogWindow extends Window implements Serializable {
|
|||||||
if (existsMandatoryFieldsInWindowContent()) {
|
if (existsMandatoryFieldsInWindowContent()) {
|
||||||
// final Label madatoryLabel = new
|
// final Label madatoryLabel = new
|
||||||
// Label(i18n.get("label.mandatory.field"));
|
// Label(i18n.get("label.mandatory.field"));
|
||||||
final Label madatoryLabel = new Label("* Mandatory Field");
|
final Label mandatoryLabel = new Label("* Mandatory Field");
|
||||||
madatoryLabel.addStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR + " " + ValoTheme.LABEL_TINY);
|
mandatoryLabel.addStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR + " " + ValoTheme.LABEL_TINY);
|
||||||
mainLayout.addComponent(madatoryLabel);
|
|
||||||
|
if (content instanceof TargetAddUpdateWindowLayout) {
|
||||||
|
((TargetAddUpdateWindowLayout) content).getFormLayout().addComponent(mandatoryLabel);
|
||||||
|
} else if (content instanceof SoftwareModuleAddUpdateWindow) {
|
||||||
|
((SoftwareModuleAddUpdateWindow) content).getFormLayout().addComponent(mandatoryLabel);
|
||||||
|
} else if (content instanceof AbstractCreateUpdateTagLayout) {
|
||||||
|
((AbstractCreateUpdateTagLayout) content).getMainLayout().addComponent(mandatoryLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
mainLayout.addComponent(mandatoryLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -690,4 +690,8 @@ public abstract class AbstractCreateUpdateTagLayout extends CustomComponent
|
|||||||
this.tagDescOriginal = tagDescOriginal;
|
this.tagDescOriginal = tagDescOriginal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridLayout getMainLayout() {
|
||||||
|
return mainLayout;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,4 +334,8 @@ public class TargetAddUpdateWindowLayout extends CustomComponent {
|
|||||||
window.addStyleName("target-update-window");
|
window.addStyleName("target-update-window");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FormLayout getFormLayout() {
|
||||||
|
return formLayout;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user