> 1) If your components extends ERXComponent, all you need to do is set:
>
> er.component.clickToOpen=true
>
> in your Properties file.
>
> If you do not use ERXComponent and instead have a custom component
> base class, you must add clickToOpen support to your components on
> your own. You should ONLY have clickToOpen execute in your component
> if you are in development mode. To include it into your component
> base class, you can use the sampe implementation in ERXComponent:
>
> ..verride
> public void appendToResponse(WOResponse response, WOContext
> context) {
> ...
> if (clickToOpenIsEnabledInYourApp) {
> super.appendToResponse(response, context);
> }
> else {
> int previousContentLength =
> ERXComponent._preProcessClickToOpen(response, context);
> super.appendToResponse(response, context);
> ERXComponent._postProcessClickToOpen(previousContentLength,
> getClass().getName(), response, context);
> }
> ...
> }
API slightly modified:
If you do not use ERXComponent and instead have a custom component
base class, you must add clickToOpen support to your components on
your own. You should ONLY have clickToOpen execute in your component
if you are in development mode. To include it into your component
base class, you can use the sample implementation from ERXComponent:
..verride
public void appendToResponse(WOResponse response, WOContext context) {
...
boolean clickToOpenEnabled = ...;
int previousContentLength =
ERXClickToOpenSupport.preProcessResponse(response, context,
clickToOpenEnabled);
super.appendToResponse(response, context);
ERXClickToOpenSupport.postProcessResponse(previousContentLength,
getClass(), response, context, clickToOpenEnabled);
...
}
Note that when clickToOpenEnabled is false, the ERXClickToOpenSupport
methods are no-ops.
ms
This archive was generated by hypermail 2.0.0 : Thu Jan 31 2008 - 01:38:09 EST