diff options
| -rw-r--r-- | id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java | 35 | ||||
| -rw-r--r-- | id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp | 2 | 
2 files changed, 23 insertions, 14 deletions
| diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java index b1e268fef..5e177655d 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java @@ -80,7 +80,7 @@ public class GeneralStorkConfig {  					}  					if (cpepslist.isEmpty()) -						cpepslist.add(new CPEPS()); +						cpepslist = null;  					if(attributes.isEmpty())  						attributes.add(new StorkAttribute()); @@ -94,21 +94,30 @@ public class GeneralStorkConfig {  			return null;  		MOAIDConfiguration dbconfig = ConfigurationDBRead.getMOAIDConfiguration(); - -		List<CPEPS> cpepss = dbconfig.getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS(); - -		// make CountryCode "readonly" -		for (CPEPS newone : cpepslist) { -			for (CPEPS current : cpepss) { -				if (null != newone) -					if (current.getHjid().equals(newone.getHjid())) { -						newone.setCountryCode(current.getCountryCode()); -						break; +		 +		try { +			List<CPEPS> cpepss = dbconfig.getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS(); + +			if (cpepss != null) { +				// make CountryCode "readonly" +				for (CPEPS newone : cpepslist) { +					for (CPEPS current : cpepss) { +						if (null != newone) +							if (current.getHjid().equals(newone.getHjid())) { +								newone.setCountryCode(current.getCountryCode()); +								break; +							}  					} +				}  			} -		} -		return cpepslist; +			return cpepslist; +			 +		} catch (NullPointerException e) { +			return null; +			 +		} +			  	}  	public void setCpepslist(List<CPEPS> list) { diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp index 1e8e36d4e..bf5625419 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp @@ -257,7 +257,7 @@  								      <td><s:checkbox name="storkconfig.cpepslist[%{#stat.index}].supportsXMLSignature" value="%{supportsXMLSignature}" /></td>  								      <td><input type="button" value="<%=LanguageHelper.getGUIString("webpages.moaconfig.stork.removepeps", request) %>" onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);'/></td></tr>  								</s:iterator> -                                <s:if test="%{storkconfig.cpepslist == null}"> +                     						<s:if test="%{storkconfig.cpepslist == null || storkconfig.cpepslist.isEmpty}">                                      <tr><td><s:textfield name="storkconfig.cpepslist[0].countryCode" value="CC" cssClass="textfield_short"/></td>                                          <td><s:textfield name="storkconfig.cpepslist[0].URL" value="http://" cssClass="textfield_long"/></td>                                          <td><input type="button" value="<%=LanguageHelper.getGUIString("webpages.moaconfig.stork.removepeps", request) %>" onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);'/></td></tr> | 
