Changes for page Click to Debug
Last modified by Kieran Kelleher on 2009/08/12 14:33
From version 19.1
edited by David Holt
on 2009/08/12 14:33
on 2009/08/12 14:33
Change comment:
Migrated to Confluence 5.3
To version 10.1
edited by Chuck Hill
on 2008/12/15 15:27
on 2008/12/15 15:27
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -WOLips Tutorials - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. dholt1 +XWiki.chillatgvc - Content
-
... ... @@ -1,16 +1,16 @@ 1 1 == What It Is == 2 2 3 -Click to Debug is a [[ doc:Click to Open]] extension that allows you to toggle binding debugging from the UI while your application is running.3 +Click to Debug is a [[Click to Open]] extension that allows you to toggle binding debugging from the UI while your applicaiton is running. 4 4 5 5 == What You Need == 6 6 7 -See the [[What You Need>> doc:Click to Open||anchor="What You Need"]] section of the Click to Open documentation if you are not already using Click to to Open.7 +See the [[What You Need>>Click to Open||anchor="What You Need"]] section of the Click to Open documentation if you are not already using Click to to Open. 8 8 9 9 == Getting Set Up == 10 10 11 -See the [[Getting Set Up>> doc:Click to Open||anchor="Getting Set Up"]] section of the Click to Open documentation if you are not already using Click to to Open.11 +See the [[Getting Set Up>>Click to Open||anchor="Getting Set Up"]] section of the Click to Open documentation if you are not already using Click to to Open. 12 12 13 -Add this line to the {{code language="none"}}Properties{{/code}}file in your application:13 +Add this line to the ##Properties## file in your application: 14 14 15 15 {{code}} 16 16 ... ... @@ -20,9 +20,9 @@ 20 20 21 21 === Add Support to Application === 22 22 23 -If your Application.java class extends (directly or indirectly) Wonder's ERXApplication, you can skip this step. Otherwise, add this to your Application() constructor, or a method that runs before requests are processed:: 23 +If your Application.java class extends (directly or indirectly) Wonder's ERXApplication, you can skip this step. Otherwise, add this to your Application() constructor, or a method that runs before requests are processed:: 24 24 25 -{{code 0="java"}}25 +{{code value="java"}} 26 26 27 27 NSNotificationCenter.defaultCenter().addObserver(this, 28 28 ERXSelectorUtilities.notificationSelector("applicationDidHandleRequest"), ... ... @@ -32,7 +32,7 @@ 32 32 33 33 Then add this method to handle this notification: 34 34 35 -{{code 0="java"}}35 +{{code value="java"}} 36 36 37 37 /** 38 38 * When request is finished, we remove the context from thread local storage. ... ... @@ -49,7 +49,7 @@ 49 49 50 50 The next part is a method that sets ERXWOContext.currentContext() when a request is dispatched: 51 51 52 -{{code 0="java"}}52 +{{code value="java"}} 53 53 54 54 /** 55 55 * When a context is created we push it into thread local storage. ... ... @@ -73,11 +73,9 @@ 73 73 74 74 And finally, add this code to support Click to Debug: 75 75 76 -{{code 0="java"}}76 +{{code value="java"}} 77 77 78 -protected void _debugValueForDeclarationNamed(WOComponent component, String verb, String aDeclarationName, 79 - String aDeclarationType, String aBindingName, 80 - String anAssociationDescription, Object aValue) { 78 +protected void _debugValueForDeclarationNamed(WOComponent component, String verb, String aDeclarationName, String aDeclarationType, String aBindingName, String anAssociationDescription, Object aValue) { 81 81 if (aValue instanceof String) { 82 82 StringBuffer stringbuffer = new StringBuffer(((String) aValue).length() + 2); 83 83 stringbuffer.append('"'); ... ... @@ -132,14 +132,12 @@ 132 132 * Little bit better binding debug output than the original. 133 133 */ 134 134 @Override 135 -public void logTakeValueForDeclarationNamed(String aDeclarationName, String aDeclarationType, 136 - String aBindingName, String anAssociationDescription, Object aValue) { 133 +public void logTakeValueForDeclarationNamed(String aDeclarationName, String aDeclarationType, String aBindingName, String anAssociationDescription, Object aValue) { 137 137 WOComponent component = ERXWOContext.currentContext().component(); 138 138 if (component.parent() != null) { 139 139 component = component.parent(); 140 140 } 141 - _debugValueForDeclarationNamed(component, " ==> ", aDeclarationName, 142 - aDeclarationType, aBindingName, anAssociationDescription, aValue); 138 + _debugValueForDeclarationNamed(component, " ==> ", aDeclarationName, aDeclarationType, aBindingName, anAssociationDescription, aValue); 143 143 } 144 144 145 145 /** ... ... @@ -146,14 +146,12 @@ 146 146 * Little bit better binding debug output than the original. 147 147 */ 148 148 @Override 149 -public void logSetValueForDeclarationNamed(String aDeclarationName, String aDeclarationType, 150 - String aBindingName, String anAssociationDescription, Object aValue) { 145 +public void logSetValueForDeclarationNamed(String aDeclarationName, String aDeclarationType, String aBindingName, String anAssociationDescription, Object aValue) { 151 151 WOComponent component = ERXWOContext.currentContext().component(); 152 152 if (component.parent() != null) { 153 153 component = component.parent(); 154 154 } 155 - _debugValueForDeclarationNamed(component, " <== ", aDeclarationName, aDeclarationType, 156 - aBindingName, anAssociationDescription, aValue); 150 + _debugValueForDeclarationNamed(component, " <== ", aDeclarationName, aDeclarationType, aBindingName, anAssociationDescription, aValue); 157 157 } 158 158 159 159 /** ... ... @@ -193,44 +193,6 @@ 193 193 194 194 == Using Click to Debug == 195 195 196 - Run your applicationand look inthe lower, left hand corner. You should see a link like this:190 +Coming soon 197 197 198 -[[image:attach:Click to Open@ClickToOpenLink.png]] 199 - 200 -If you don't, check that the page has the WOLToolBar on it and that the {{code language="none"}}er.component.clickToOpen{{/code}} property is set to true and the {{code language="none"}}er.extensions.ERXApplication.developmentMode{{/code}} property is set to true. 201 - 202 -\\ 203 - 204 -Click on this component to open the Click to Open UI: 205 - 206 -[[image:attach:Click to Open@WOLipsToolbar.png]] 207 - 208 -**EditDisplayAd** is the page in the browser. Click on this link to open this page in Eclipse. 209 - 210 -\\ 211 - 212 -If you are looking for a sub-component of this page, click on the **Click to Debug** link. As you move your mouse over the page, the bread crumb of components will change to show you where you are. Just click to turn binding debug on (or off if it is on) for the component under the mouse in Eclipse. It is that easy! 213 - 214 -[[image:attach:ClickToDebugInAction.png]] 215 - 216 -\\ 217 - 218 -With binding debug on, you'll get output like: 219 - 220 -{{code}} 221 - 222 -DEBUG NSLog - HatchViewTaskPage ==> [inline]:HatchEditTask { task=task; } value <com.mdimension.mdtask.model.Task pk:"1027787"> 223 -DEBUG NSLog - HatchViewTaskPage <== [inline]:HatchEditTask { task=task; } value <com.mdimension.mdtask.model.Task pk:"1027787"> 224 -DEBUG NSLog - HatchViewTaskPage ==> [inline]:HatchEditTask { task=task; } value <com.mdimension.mdtask.model.Task pk:"1027787"> 225 -DEBUG NSLog - HatchViewTaskPage <== [inline]:HatchEditTask { task=task; } value <com.mdimension.mdtask.model.Task pk:"1027787"> 226 -DEBUG NSLog - HatchViewTaskPage ==> [inline]:HatchEditTask { task=task; } value <com.mdimension.mdtask.model.Task pk:"1027787"> 227 -DEBUG NSLog - HatchViewTaskPage <== [inline]:HatchEditTask { task=task; } value null 228 -DEBUG NSLog - HatchViewTaskPage ==> [inline]:HatchEditTask { task=task; } value null 229 -DEBUG NSLog - HatchViewTaskPage <== [inline]:HatchEditTask { task=task; } value null 230 - 231 -{{/code}} 232 - 233 -**Note**: A prefix like {{code language="none"}}Dec 13 11:00:29 MDTask[WOL:62934] (ERXNSLogLog4jBridge.java:46){{/code}} was removed from each line above to make this easier to read. 234 - 235 -So what that's showing is HatchViewTaskPage component is pushing the task binding into the HatchEditTask component with the value Task 236 -1027787, then HatchEditTask component is pushing the binding back up. So you can see here that 6th line, HatchEditTask component is pushing a null binding back out (which, in this case, was causing a problem I was trying to find). 192 +== ==
- ClickToDebugInAction.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -20.8 KB - Content