Changes for page Click to Open
Last modified by Kieran Kelleher on 2012/07/21 20:41
From version 56.1
edited by Pascal Robert
on 2010/09/13 00:33
on 2010/09/13 00:33
Change comment:
There is no comment for this version
To version 58.1
edited by Pascal Robert
on 2012/07/21 20:41
on 2012/07/21 20:41
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,20 +1,24 @@ 1 1 == What It Is == 2 2 3 -Click to Open (C2O) allows you to open components in Eclipse directly from the running application in your browser 3 +Click to Open (C2O) allows you to open components in Eclipse directly from the running application in your browser! Click to Open appears in the lower left corner of browser as part of the pages of your running application. Clicking on this component, and then on an object in the browser window, opens the relevant WOComponent in Eclipse. This makes life easier for UI designers and for developers getting familiar with new projects. It also provides some other very slick debugging tools. 4 4 5 -Check out the [[screencast at the mDimension build site>>http://webobjects.mdimension.com/wolips/support/screencasts/WOLipsFramework.m4v]] 5 +Check out the [[screencast at the mDimension build site>>url:http://webobjects.mdimension.com/wolips/support/screencasts/WOLipsFramework.m4v||shape="rect"]] 6 6 7 -Click to Open is a browser based extension to WOLips found in [[Project Wonder>>WONDER :Home]].7 +Click to Open is a browser based extension to WOLips found in [[Project Wonder>>doc:WONDER.Home]]. All of the Wonder ERD2W components support Click to Open. 8 8 9 9 **Note that click-to-open support is expensive, because it has to dig around your component HTML quite a bit, so you will take a performance hit in development to have it enabled.** 10 10 11 -Also note that if you use ERExcelLook or ERPDFGeneration that you will want to disable Click to Open in development. The former you can do in a rule: {{code}}*10: pageConfiguration like '*Excel' => clickToOpenEnabled = "false" [com.webobjects.directtoweb.BooleanAssignment]{{/code}}11 +*Also note that if you use ERExcelLook or ERPDFGeneration that you will want to disable Click to Open in development. The former you can do in a rule: 12 12 13 +{{code}} 14 +*10 : pageConfiguration like '*Excel' => clickToOpenEnabled = "false" [com.webobjects.directtoweb.BooleanAssignment] 15 +{{/code}} 16 + 13 13 The latter in your component: 14 14 15 15 {{code}} 16 16 17 - 21 +public boolean clickToOpenEnabled(WOResponse response, WOContext context) { 18 18 return false; 19 19 } 20 20 ... ... @@ -22,27 +22,27 @@ 22 22 23 23 == What You Need == 24 24 25 -You need the **WOLips** framework that is part of Project Wonder. 29 +You need the **WOLips** framework that is part of Project Wonder. You also need the **ERExtensions** framework that is part of Project Wonder on the class path at runtime. If you already use Project Wonder, you are almost done. 26 26 27 -If you are not using Project Wonder, you can download it from [[mDimension's site>>http://webobjects.mdimension.com/wonder/]], untar the frameworks, and copy just the WOLips.framework and ERExtensions.framework to where you have the rest of your frameworks (usually /Library/Frameworks or /Library/Frameworks). 31 +If you are not using Project Wonder, you can download it from [[mDimension's site>>url:http://webobjects.mdimension.com/wonder/||shape="rect"]], untar the frameworks, and copy just the WOLips.framework and ERExtensions.framework to where you have the rest of your frameworks (usually /Library/Frameworks or ~~/Library/Frameworks). 28 28 29 29 == Getting Set Up == 30 30 31 31 === Add the WOLips.framework === 32 32 33 -Follow the [[tutorial>>Add a Framework Dependency]] on adding a framework to add WOLips.framework and ERXExtentions.framework to your application. 37 +Follow the [[tutorial>>doc:Add a Framework Dependency]] on adding a framework to add WOLips.framework and ERXExtentions.framework to your application. 34 34 35 35 === Add Support to Component Base Class === 36 36 37 -If your components extend Wonder's ERXComponent, you can skip this step. 41 +If your components extend Wonder's ERXComponent, you can skip this step. Once again, using Wonder makes your life easier. 38 38 39 -If you don't have a custom component base class, you really should. 43 +If you don't have a custom component base class, you really should. Using com.webobjects.appserver.WOComponent as the super-class for your pages and components is just going to leave you doing the same things over and over. If you don't have one, you might want to start using the ClickToOpenComponent below. 40 40 41 41 You will need to add the appendToResponse(WOResponse, WOContext) method below to your component base class, or add this code to your appendToResponse method if you already have one. 42 42 43 43 Here is an example implementation of a component base class and of Click to Open support: 44 44 45 -{{code value="java"}}49 +{{code 0="java"}} 46 46 47 47 package net.com.foo.bar; 48 48 ... ... @@ -75,7 +75,7 @@ 75 75 76 76 For components that can't sub-class ClickToOpenComponent (directly or indirectly), you can enable Click to Open by adding this method to your component: 77 77 78 -{{code value="java"}}82 +{{code 0="java"}} 79 79 80 80 public void appendToResponse(WOResponse response, WOContext context) 81 81 { ... ... @@ -90,9 +90,9 @@ 90 90 91 91 === Add Support to Application === 92 92 93 -If your Application.java class extends Wonder's ERXApplication, you can skip this step too. 97 +If your Application.java class extends Wonder's ERXApplication, you can skip this step too. Otherwise, add a developmentMode() method like this: 94 94 95 -{{code value="java"}}99 +{{code 0="java"}} 96 96 97 97 private Boolean isDevelopmentMode; 98 98 public boolean developmentMode() { ... ... @@ -125,7 +125,7 @@ 125 125 126 126 === Provide prototype.js === 127 127 128 -WOLips.framework needs a prototype.js. 132 +WOLips.framework needs a prototype.js. If you are using Ajax framework, you don't need to do anything, because it will default to use Ajax.framework's prototype.js. However, if you are not, add this to your application's Properties file (as an example, change the values as appropriate): 129 129 130 130 {{code}} 131 131 ... ... @@ -138,17 +138,17 @@ 138 138 139 139 In your page wrapper's HTML template, add 140 140 141 -{{code value="html"}}145 +{{code 0="html"}} 142 142 143 143 <wo:WOLToolBar/> 144 144 145 145 {{/code}} 146 146 147 -and you're done. 151 +and you're done. If you don't have a [[page wrapper>>doc:Development-Examples-Page Layout]], you will have to add this to every page. Hint: page wrappers make your life easier. 148 148 149 149 If you are using the old WO template syntax, add this to the .html file: 150 150 151 -{{code value="html"}}155 +{{code 0="html"}} 152 152 153 153 <webobject name="WOLToolBar" /> 154 154 ... ... @@ -156,7 +156,7 @@ 156 156 157 157 And add this to the .wod file: 158 158 159 -{{code value="html"}}163 +{{code 0="html"}} 160 160 161 161 WOLToolBar: WOLToolBar{ 162 162 } ... ... @@ -165,13 +165,13 @@ 165 165 166 166 === Configure WOLips Server === 167 167 168 -You must be using a recent version of WOLips that supports the **WOLips Server**. ##wolips.password##in the **Set Application Properties** section above.172 +You must be using a recent version of WOLips that supports the **WOLips Server**. In your WOLips preferences, you must enable the WOLips Server and set the communication password. This password must match the {{code language="none"}}wolips.password{{/code}} in the **Set Application Properties** section above. 169 169 170 170 **Turning on the WOLips Server requires Eclipse to be restarted.** 171 171 172 -[[image:WOLipsServerPreferences.png]] 176 +[[image:attach:WOLipsServerPreferences.png]] 173 173 174 -You can optionally change the port number. ##wolips.port##in the **Set Application Properties** section above.178 +You can optionally change the port number. If you do change the port number, see {{code language="none"}}wolips.port{{/code}} in the **Set Application Properties** section above. 175 175 176 176 === Enable Click to Open === 177 177 ... ... @@ -182,33 +182,32 @@ 182 182 183 183 If you are not using Wonder, add the Launch parameters as follows: 184 184 185 -* Parameter = **Der.component.clickToOpen=true**, Argument = **true** 186 -* Parameter = **Der.extensions.ERXApplication.developmentMode=true** Argument = **true** 187 -(needing to have "true" twice is a [[minor bug>>http://issues.objectstyle.org/jira/browse/WOL-787]]. The really important one is the first one) 189 +* Parameter = **-Der.component.clickToOpen=true**, Argument = **true** 190 +* Parameter = **-Der.extensions.ERXApplication.developmentMode=true** Argument = **true** 188 188 189 -[[image:EnableClickToOpen.png]] 192 +[[image:attach:EnableClickToOpen.png]] 190 190 191 191 == Using Click to Open == 192 192 193 -Run your application and look in the lower, left hand corner. 196 +Run your application and look in the lower, left hand corner. You should see a link like this: 194 194 195 -[[image:ClickToOpenLink.png]] 198 +[[image:attach:ClickToOpenLink.png]] 196 196 197 -If you don't, check that the page has the WOLToolBar on it and that the ##er.component.clickToOpen##property is set to true and the##er.extensions.ERXApplication.developmentMode##property is set to true.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. 198 198 199 199 \\ 200 200 201 201 Click on this component to open the Click to Open UI: 202 202 203 -[[image:WOLipsToolbar.png]] 206 +[[image:attach:WOLipsToolbar.png]] 204 204 205 -**EditDisplayAd** is the page in the browser. 208 +**EditDisplayAd** is the page in the browser. Click on this link to open this page in Eclipse. 206 206 207 207 \\ 208 208 209 -If you are looking for a sub-component of this page, click on the **Click to Open** link. 212 +If you are looking for a sub-component of this page, click on the **Click to Open** 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 open the component under the mouse in Eclipse. It is that easy! 210 210 211 -[[image:ClickToOpenInAction.png]] 214 +[[image:attach:ClickToOpenInAction.png]] 212 212 213 213 \\ 214 214 ... ... @@ -217,5 +217,5 @@ 217 217 * Esc is a shortcut for getting out of click-to-open mode 218 218 * hold down the Cmd key while you move the mouse around and it will highlight the component 219 219 * Cmd-click it will popup the stack of components and you can pick from the stack: 220 -[[image:ComponentStack.png]] 221 -* you can set the binding ##expanded=true;##on WOLToolBar so it's open by default, instead of closed223 +[[image:attach:ComponentStack.png]] 224 +* you can set the binding {{code language="none"}}expanded=true;{{/code}} on WOLToolBar so it's open by default, instead of closed