You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/08/21 03:07:17 UTC

svn commit: r433130 - /incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js

Author: mturyn
Date: Sun Aug 20 20:07:16 2006
New Revision: 433130

URL: http://svn.apache.org/viewvc?rev=433130&view=rev
Log:
Now will handle the case in which one attempts to lay out a child node within something that's not supposed to be a parent (as indicated by its call to getDisplayDomNode() returning the null object) better---throws an exception explaning the situation.

Modified:
    incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js

Modified: incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js?rev=433130&r1=433129&r2=433130&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js Sun Aug 20 20:07:16 2006
@@ -128,9 +128,17 @@
       
     
 		// This is necessary if a Dojo widget is the parentPeer:
-		// This is probably a kludge, but I don't want to
-		// muck around with handler.getPeer() at the moment:
 		if( handler.getDisplayDomNode ){
+			if (!handler.getDisplayDomNode()){
+				throw new xap.util.Exception(
+							"Problem inserting component managed by "
+							+ this.toString()
+							+ " into a container managed by " 
+							+ parentHandler.toString()
+							+ "; parent doesn't have a suitable container."
+												) ;
+				return ;
+			}			
 			parentPeerNode = handler.getDisplayDomNode() ;
 		}