[Mapbender-commits] r7189 - trunk/mapbender/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Dec 6 08:23:01 EST 2010


Author: christoph
Date: 2010-12-06 05:23:01 -0800 (Mon, 06 Dec 2010)
New Revision: 7189

Modified:
   trunk/mapbender/lib/resultGeometryListController.js
Log:
error message if WFS configuration has no labeled and show element

Modified: trunk/mapbender/lib/resultGeometryListController.js
===================================================================
--- trunk/mapbender/lib/resultGeometryListController.js	2010-12-03 15:11:33 UTC (rev 7188)
+++ trunk/mapbender/lib/resultGeometryListController.js	2010-12-06 13:23:01 UTC (rev 7189)
@@ -124,6 +124,7 @@
 		var labelArray = [null,null,null,null,null,null,null,null,
 		                  null,null,null,null,null,null,null,null,
 		                  null,null,null,null];
+		var haslabeledColumn = false;
 		for (var j = 0 ; j < currentWfsConf.element.length ; j++) {
 			if(currentWfsConf.element[j].f_show == 1 && currentWfsConf.element[j].f_label!==''){
 				var labelPos = currentWfsConf.element[j].f_respos;
@@ -131,9 +132,13 @@
 					name : currentWfsConf.element[j].element_name,
 					label : currentWfsConf.element[j].f_label
 				};
+				haslabeledColumn = true;
 			}
 		}
 		resultArray = [];
+		if (!hasLabeledColumn) {
+			new mb_exception("The WFS configuration must have at least one element which has a label and a 'show' flag.");
+		}
 		for (index in labelArray){
 			if (labelArray[index]  !== undefined && labelArray[index]  !== null){
 				resultArray.push(labelArray[index]);



More information about the Mapbender_commits mailing list