Changes for page Click to Open
Last modified by Kieran Kelleher on 2012/07/21 20:41
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,19 +1,17 @@ 1 1 == What It Is == 2 2 3 -C lick 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.3 +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/preview/WOLipsFramework.m4v]] 5 +Check out the [[screencast at the mDimension build site>>http://webobjects.mdimension.com/wolips/preview/WOLipsFramework.m4v]]! 6 6 7 -Click to Open is a browser based extension to WOLips found in [[Project Wonder>>WONDER:Home]]. All of the Wonder ERD2W components support Clickto Open.7 +Click to Open is a browser based extension to WOLips found in [[Project Wonder>>WONDER:Home]]. All of the Wonder ERD2W components support this. 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 11 == What You Need == 12 12 13 -You need the **WOLips** framework that is part of Project Wonder. You a lsoneed the**ERExtensions**frameworkthatispartofProject Wonderon theclasspathatruntime.Ifyou alreadyuseProjectWonder,areyou almostdone.13 +You either need to be using Project Wonder or you need to get the **WOLips** framework that is part of Project Wonder. You can download it from [[mDimension's site>>http://webobjects.mdimension.com/wonder/]]. If not using Wonder, untar the frameworks and copy WOLips.framework to where you have the rest of your frameworks (usually /Library or ,,/Library).,, 14 14 15 -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 or ,,/Library).,, 16 - 17 17 == Getting Set Up == 18 18 19 19 === Add the WOLips.framework === ... ... @@ -24,11 +24,11 @@ 24 24 25 25 If your components extend Wonder's ERXComponent, you can skip this step. Once again, using Wonder makes your life easier. 26 26 27 -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.25 +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. 28 28 29 -You will need to add the appendToResponse(WOResponse, WOContext) method belowto your component base class, or add thiscode toyourappendToResponse methodif you alreadyhave27 +You will need to add the appendToResponse(WOResponse, WOContext) method to your component base class, or add to it if you already have that method. You should ONLY have clickToOpen execute in your component if you are in development mode. 30 30 31 - Hereis anexample implementation ofacomponent base class andofClickto Opensupport:29 +To include it into your component base class, you can use this sample implementation: 32 32 33 33 {{code value="java"}} 34 34 ... ... @@ -35,8 +35,8 @@ 35 35 package net.com.foo.bar; 36 36 37 37 import com.webobjects.appserver.*; 36 +import er.extensions.*; 38 38 39 - 40 40 /** 41 41 * Support for "Click to Open" navigation from the browser to the template in Eclipse. To enable this, 42 42 * launch with: ... ... @@ -46,7 +46,7 @@ 46 46 */ 47 47 public class ClickToOpenComponent extends com.webobjects.appserver.WOComponent { 48 48 49 - public static final boolean isClickToOpenEnabled = Boolean.getBoolean(System.getProperty("er.component.clickToOpen","false"));47 + public static final boolean isClickToOpenEnabled = ERXProperties.booleanForKeyWithDefault("er.component.clickToOpen", false); 50 50 51 51 public ClickToOpenComponent(WOContext context) { 52 52 super(context); ... ... @@ -85,7 +85,7 @@ 85 85 private Boolean isDevelopmentMode; 86 86 public boolean developmentMode() { 87 87 if (isDevelopmentMode == null) { 88 - isDevelopmentMode = new Boolean( System.getProperty("er.extensions.ERXApplication.developmentMode","false"));86 + isDevelopmentMode = new Boolean(ERXProperties.booleanForKey("er.extensions.ERXApplication.developmentMode", false)); 89 89 } 90 90 return isDevelopmentMode.booleanValue(); 91 91 } ... ... @@ -153,7 +153,8 @@ 153 153 154 154 === Configure WOLips Server === 155 155 156 -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 ##wolips.password## in the **Set Application Properties** section above. 154 +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 155 +password. 157 157 158 158 **Turning on the WOLips Server requires Eclipse to be restarted.** 159 159 ... ... @@ -169,32 +169,15 @@ 169 169 170 170 == Using Click to Open == 171 171 172 -Run your application and look in the lower, left hand corner. You should see a link like this: 173 - 174 174 [[image:ClickToOpenLink.png]] 175 175 176 -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. 177 - 178 -\\ 179 - 180 -Click on this component to open the Click to Open UI: 181 - 182 182 [[image:ClickToOpenExpanded.png]] 183 183 184 -**EditDisplayAd** is the page in the browser. Click on this link to open this page in Eclipse. 185 - 186 -\\ 187 - 188 -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! 189 - 190 190 [[image:ClickToOpenInAction.png]] 191 191 192 -\\ 193 - 194 -=== Additional Functionality === 195 - 196 -* Esc is a shortcut for getting out of click-to-open mode 197 -* hold down the Cmd key while you move the mouse around and it will highlight the component 198 -* Cmd-click it will popup the stack of components and you can pick from the stack: 199 -[[image:ComponentStack.png]] 200 -* you can the binding ##expanded=true;## on WOLToolBar so it's open by default, instead of closed 177 +you can hold cmd 178 +and it will highlight the component 179 +and if you cmd-click 180 +it will popup the stack 181 +and you can pick from the stack 182 +also esc is a shortcut for getting out of click-to-open mode