fix error in email target editor,
now it is possible to remove single targets
This commit is contained in:
parent
51a4a6acf3
commit
f6d628486d
1
pom.xml
1
pom.xml
@ -17,6 +17,7 @@
|
||||
<module>persistence</module>
|
||||
<module>services</module>
|
||||
<module>xmlrpc</module>
|
||||
<module>web</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
|
12
web/pom.xml
12
web/pom.xml
@ -2,11 +2,15 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.hostsharing</groupId>
|
||||
<artifactId>hs.hsadmin.web</artifactId>
|
||||
<parent>
|
||||
<groupId>de.hsadmin</groupId>
|
||||
<artifactId>hsadmin-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>admin-web</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>hs.hsadmin.web</name>
|
||||
<name>HSAdmin Webapp</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
@ -90,10 +90,16 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
||||
if (child instanceof AbstractOrderedLayout) {
|
||||
final Component grandChild = ((AbstractOrderedLayout) child).getComponent(1);
|
||||
if (grandChild instanceof TextField) {
|
||||
targetsList.add(((TextField) grandChild).getValue());
|
||||
final String value = ((TextField) grandChild).getValue();
|
||||
if (value != null && !value.isEmpty()) {
|
||||
targetsList.add(value);
|
||||
}
|
||||
}
|
||||
if (grandChild instanceof NativeSelect) {
|
||||
targetsList.add(((NativeSelect) grandChild).getValue().toString());
|
||||
final Object value = ((NativeSelect) grandChild).getValue();
|
||||
if (value != null) {
|
||||
targetsList.add(value.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -166,9 +172,12 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
|
||||
setWidth("100%");
|
||||
setSpacing(true);
|
||||
final NativeSelect targetTypeSelect = new NativeSelect();
|
||||
targetTypeSelect.addItems(new Object[] { I18N.getText("emailtarget.email"), I18N.getText("emailtarget.postbox"), I18N.getText("emailtarget.alias") });
|
||||
targetTypeSelect.setMultiSelect(false);
|
||||
targetTypeSelect.setNullSelectionAllowed(true);
|
||||
targetTypeSelect.setNullSelectionItemId(" ");
|
||||
targetTypeSelect.addItems(new Object[] { " ", I18N.getText("emailtarget.email"), I18N.getText("emailtarget.postbox"), I18N.getText("emailtarget.alias") });
|
||||
targetTypeSelect.setValue(" ");
|
||||
targetTypeSelect.setWidth("6.0em");
|
||||
targetTypeSelect.setValue("");
|
||||
addComponent(targetTypeSelect);
|
||||
setComponentAlignment(targetTypeSelect, Alignment.MIDDLE_LEFT);
|
||||
setExpandRatio(targetTypeSelect, 0.0f);
|
||||
|
Loading…
Reference in New Issue
Block a user