Class OpenKettleStatusCommand
java.lang.Object
org.pentaho.mantle.client.commands.AbstractCommand
org.pentaho.mantle.client.commands.OpenKettleStatusCommand
- All Implemented Interfaces:
com.google.gwt.core.client.Scheduler.ScheduledCommand
,com.google.gwt.user.client.Command
public class OpenKettleStatusCommand
extends org.pentaho.mantle.client.commands.AbstractCommand
Executes the Open Kettle Status command.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
openNewWindow
(String url, String wname, boolean forceFocus) This method open a new browser tab with the provided url and set the focus to it http://stackoverflow.com/questions/3311293/javascript-bring-window-to-front-if-already-open-in-window-open#answer-24418324 ".focus() command is likely not going to work in all browsers.protected void
Executes the command to open the kettle status page.protected void
performOperation
(boolean feedback) Methods inherited from class org.pentaho.mantle.client.commands.AbstractCommand
execute, execute, execute, execute, execute, performOperationAsync
-
Constructor Details
-
OpenKettleStatusCommand
public OpenKettleStatusCommand()
-
-
Method Details
-
performOperation
protected void performOperation()Executes the command to open the kettle status page.- Specified by:
performOperation
in classorg.pentaho.mantle.client.commands.AbstractCommand
-
performOperation
protected void performOperation(boolean feedback) - Specified by:
performOperation
in classorg.pentaho.mantle.client.commands.AbstractCommand
-
openNewWindow
This method open a new browser tab with the provided url and set the focus to it http://stackoverflow.com/questions/3311293/javascript-bring-window-to-front-if-already-open-in-window-open#answer-24418324 ".focus() command is likely not going to work in all browsers. This used to work back in the day but not any more, mainly due to browsers working to actively stop shady ad networks from pushing their popup ads to the foreground. In Mozilla Firefox in particular (depending on your version) there is a configuration setting that is turned on by default that stops other windows (e.g. popups) from focusing themselves. You can find this setting in the about:config page (tread carefully!) Other browsers may implement something similar, but quite simply if 1 of the major browsers blocks the use of .focus() by default then there's not much use in attempting to call it. As a result, the only solution I've seen that works is to see if the window exists and is not already closed... and if so close it, then load the window you want."- Parameters:
url
- URL address to openwname
- window name to apply for the new window to be open
-