Package io.jmix.ui.sys
Class WebBrowserToolsImpl
java.lang.Object
io.jmix.ui.sys.WebBrowserToolsImpl
- All Implemented Interfaces:
WebBrowserTools
@UIScope
@Component("ui_WebBrowserTools")
public class WebBrowserToolsImpl
extends Object
implements WebBrowserTools
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes 'onbeforeunload' listener.void
Adds 'onbeforeunload' listener that prevents browser tab from closing.void
void
showWebPage
(String url, Map<String, Object> params) Open a web page in browser.
-
Field Details
-
BEFORE_UNLOAD_LISTENER
- See Also:
-
ui
-
-
Constructor Details
-
WebBrowserToolsImpl
public WebBrowserToolsImpl()
-
-
Method Details
-
setAppUi
-
showWebPage
Description copied from interface:WebBrowserTools
Open a web page in browser.- Specified by:
showWebPage
in interfaceWebBrowserTools
- Parameters:
url
- URL of the pageparams
- optional parameters.
The following parameters are recognized by Web client:target
- String value used as the target name in a window.open call in the client. This means that special values such as "_blank", "_self", "_top", "_parent" have special meaning. If not specified, "_blank" is used.-
width
- Integer value specifying the width of the browser window in pixels -
height
- Integer value specifying the height of the browser window in pixels -
border
- String value specifying the border style of the window of the browser window. Possible values are "DEFAULT", "MINIMAL", "NONE".
-
preventBrowserTabClosing
public void preventBrowserTabClosing()Description copied from interface:WebBrowserTools
Adds 'onbeforeunload' listener that prevents browser tab from closing.- Specified by:
preventBrowserTabClosing
in interfaceWebBrowserTools
-
allowBrowserTabClosing
public void allowBrowserTabClosing()Description copied from interface:WebBrowserTools
Removes 'onbeforeunload' listener.- Specified by:
allowBrowserTabClosing
in interfaceWebBrowserTools
-