Click to Open

compared with
Current by David Holt
on Aug 11, 2010 22:12.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History
*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.*

\*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}


The latter in your component:

{code}
public boolean clickToOpenEnabled(WOResponse response, WOContext context) {
return false;
}
{code}

h2. What You Need

public class ClickToOpenComponent extends com.webobjects.appserver.WOComponent {

public static final boolean isClickToOpenEnabled = Boolean.getBoolean(System.getProperty("er.component.clickToOpen", Boolean.parseBoolean(System.getProperty("er.component.clickToOpen", "false"));

public ClickToOpenComponent(WOContext context) {
* Parameter = *\-Der.component.clickToOpen=true*, Argument = *true*
* Parameter = *\-Der.extensions.ERXApplication.developmentMode=true* Argument = *true*
(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)