Mercurial > dive4elements > river
changeset 1592:f34bbb5fb6d2
Added TODO and handle dynamic data of unknown type.
flys-client/trunk@3892 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 03 Feb 2012 11:15:09 +0000 |
parents | 8ab010967f78 |
children | ff9d71469b7c |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Fri Feb 03 08:30:58 2012 +0000 +++ b/flys-client/ChangeLog Fri Feb 03 11:15:09 2012 +0000 @@ -1,3 +1,8 @@ +2012-02-03 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java: + Added TODO and create defaultdata for unknown typed dynamic data. + 2012-02-03 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java Fri Feb 03 08:30:58 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java Fri Feb 03 11:15:09 2012 +0000 @@ -136,6 +136,8 @@ logger.debug("Create new IntegerRangeData object for: " + name); logger.debug("New Data is from type: " + type); + // TODO replace with DataFactory. + if (type == null || type.length() == 0) { NodeList choices = ClientProtocolUtils.getItemNodes(d); DataItem[] dataItems = extractCurrentDataItems(choices); @@ -179,6 +181,15 @@ list.add(new IntegerOptionsData(name, label, opts)); } + else { + logger.warn("Unrecognized Dynamic data type."); + NodeList choices = ClientProtocolUtils.getItemNodes(d); + DataItem[] dataItems = extractCurrentDataItems(choices); + DataItem def = extractDefaultDataItem(d); + + list.add(new DefaultData(name, label, null, dataItems, def)); + } + } return list;