Changes for page Click to Open

Last modified by Kieran Kelleher on 2012/07/21 20:41

From version 23.1
edited by chuckhill
on 2008/03/12 14:11
Change comment: Edits and images
To version 24.1
edited by chuckhill
on 2008/03/12 00:49
Change comment: Still in progress

Summary

Details

Page properties
Content
... ... @@ -45,7 +45,7 @@
45 45   */
46 46  public class ClickToOpenComponent extends com.webobjects.appserver.WOComponent {
47 47  
48 - public static final boolean isClickToOpenEnabled = ERXProperties.booleanForKeyWithDefault("er.component.clickToOpen", false);
48 + private static final boolean isClickToOpenEnabled = ERXProperties.booleanForKeyWithDefault("er.component.clickToOpen", false);
49 49  
50 50   public ClickToOpenComponent(WOContext context) {
51 51   super(context);
... ... @@ -60,21 +60,8 @@
60 60  
61 61  {{/code}}
62 62  
63 -For components that can't sub-class ClickToOpenComponent (directly or indirectly), you can enable Click to Open by adding this method to your component:
63 +Note that when isClickToOpenEnabled is false, the ERXClickToOpenSupport methods are no-ops.
64 64  
65 -{{code value="java"}}
66 -
67 -public void appendToResponse(WOResponse response, WOContext context)
68 -{
69 - ERXClickToOpenSupport.preProcessResponse(response, context, ClickToOpenComponent.isClickToOpenEnabled);
70 - super.appendToResponse(response, context);
71 - ERXClickToOpenSupport.postProcessResponse(getClass(), response, context, ClickToOpenComponent.isClickToOpenEnabled);
72 -}
73 -
74 -{{/code}}
75 -
76 -**Note that when isClickToOpenEnabled is false, the ERXClickToOpenSupport methods are no-ops.**
77 -
78 78  === Add Support to Application ===
79 79  
80 80  If your Application.java class extends Wonder's ERXApplication, you can skip this step too. Otherwise, add a developmentMode() method like this:
... ... @@ -98,10 +98,10 @@
98 98  
99 99  In your application preferences, you can then set:
100 100  
101 -wolips.host=localhost
102 -wolips.port=9485
103 -wolips.password=yourpassword
104 -er.component.clickToOpen=true
88 + wolips.host=localhost
89 + wolips.port=9485
90 + wolips.password=yourpassword
91 + er.component.clickToOpen=true
105 105  
106 106  Only 'wolips.password' is strictly required as long as you use the default port of 9485.
107 107  
... ... @@ -125,12 +125,4 @@
125 125  your WOLips preferences, you must enable the WOLips Server, set the port number and the communication
126 126  password. Turning on the WOLips Server requires a restart of WOLips.
127 127  
128 -[[image:WOLipsServerPreferences.png]]
129 -
130 130  == Using Click to Open ==
131 -
132 -[[image:ClickToOpenLink.png]]
133 -
134 -[[image:ClickToOpenExpanded.png]]
135 -
136 -[[image:ClickToOpenInAction.png]]