Author: scottbw
Date: Tue Nov 17 16:49:22 2009
New Revision: 881369

URL: http://svn.apache.org/viewvc?rev=881369&view=rev
Log:
Fix for WOOKIE-44 the impl of the sharedDataForKey DWR method was not catching 
nulls; I've trapped these now and return the "No matching key found" error 
message as per preferenceForKey().

Modified:
    
incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java

Modified: 
incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java?rev=881369&r1=881368&r2=881369&view=diff
==============================================================================
--- 
incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java 
(original)
+++ 
incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java 
Tue Nov 17 16:49:22 2009
@@ -133,7 +133,8 @@
                if(key==null) return 
localizedMessages.getString("WidgetAPIImpl.1");
                WidgetInstance widgetInstance = 
WidgetInstance.findByIdKey(id_key);
                if (widgetInstance == null) return 
localizedMessages.getString("WidgetAPIImpl.0");
-               //
+               SharedData data = 
SharedData.findSharedDataForInstance(widgetInstance, key);
+               if (data == null) return 
localizedMessages.getString("WidgetAPIImpl.1");
                return SharedData.findSharedDataForInstance(widgetInstance, 
key).getDvalue();
        }
 


Reply via email to