Changes for page Click to Open

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

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

Summary

Details

Page properties
Content
... ... @@ -45,7 +45,7 @@
45 45   */
46 46  public class ClickToOpenComponent extends com.webobjects.appserver.WOComponent {
47 47  
48 - private static final boolean isClickToOpenEnabled = ERXProperties.booleanForKeyWithDefault("er.component.clickToOpen", false);
48 + public static final boolean isClickToOpenEnabled = ERXProperties.booleanForKeyWithDefault("er.component.clickToOpen", false);
49 49  
50 50   public ClickToOpenComponent(WOContext context) {
51 51   super(context);
... ... @@ -60,8 +60,21 @@
60 60  
61 61  {{/code}}
62 62  
63 -Note that when isClickToOpenEnabled is false, the ERXClickToOpenSupport methods are no-ops.
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:
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 +
65 65  === Add Support to Application ===
66 66  
67 67  If your Application.java class extends Wonder's ERXApplication, you can skip this step too. Otherwise, add a developmentMode() method like this:
... ... @@ -85,10 +85,10 @@
85 85  
86 86  In your application preferences, you can then set:
87 87  
88 - wolips.host=localhost
89 - wolips.port=9485
90 - wolips.password=yourpassword
91 - er.component.clickToOpen=true
101 +wolips.host=localhost
102 +wolips.port=9485
103 +wolips.password=yourpassword
104 +er.component.clickToOpen=true
92 92  
93 93  Only 'wolips.password' is strictly required as long as you use the default port of 9485.
94 94  
... ... @@ -112,4 +112,12 @@
112 112  your WOLips preferences, you must enable the WOLips Server, set the port number and the communication
113 113  password. Turning on the WOLips Server requires a restart of WOLips.
114 114  
128 +[[image:WOLipsServerPreferences.png]]
129 +
115 115  == Using Click to Open ==
131 +
132 +[[image:ClickToOpenLink.png]]
133 +
134 +[[image:ClickToOpenExpanded.png]]
135 +
136 +[[image:ClickToOpenInAction.png]]