added a new serializer - the "empty" serializer, for those widgets who don't
need a serializer (like the TooltipWidget for instance).
--- a/src/js/data.js Thu Nov 03 13:07:33 2011 +0100
+++ b/src/js/data.js Thu Nov 03 13:08:32 2011 +0100
@@ -46,6 +46,11 @@
/* This function returns serializer set-up with the correct
configuration - takes a metadata struct describing the metadata source
*/
+
+ if (metadataOptions === undefined)
+ /* return an empty serializer */
+ return IriSP.Serializer("", "");
+
switch(metadataOptions.type) {
case "json":
return new IriSP.JSONSerializer(this._dataloader, metadataOptions.src);
@@ -54,8 +59,12 @@
case "dummy": /* only used for unit testing - not defined in production */
return new IriSP.MockSerializer(this._dataloader, metadataOptions.src);
break;
+
+ case "empty":
+ return new IriSP.Serializer("", "empty");
+ break;
- default:
+ default:
return undefined;
}
};