/** * Returns the browser object representing the web browser's "user-agent" string. You can obtain * browser name, version, platform and Mozilla version, etc. through this object. <br> * Good for WOConditional's condition binding to deal with different browser versions. * * @return browser object */ public ERXBrowser browser() { if (browser == null && request() != null) { ERXBrowserFactory browserFactory = ERXBrowserFactory.factory(); browser = browserFactory.browserMatchingRequest(request()); browserFactory.retainBrowser(browser); } return browser; }
@Override public WOActionResults performActionNamed(String actionName) { WOActionResults actionResult = super.performActionNamed(actionName); if (browser != null) ERXBrowserFactory.factory().releaseBrowser(browser); return actionResult; }