com.vaadin.ui.Window.executeJavaScript()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 JavaScript  
字(2.2k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中com.vaadin.ui.Window.executeJavaScript()方法的一些代码示例,展示了Window.executeJavaScript()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.executeJavaScript()方法的具体详情如下:
包路径:com.vaadin.ui.Window
类名称:Window
方法名:executeJavaScript

Window.executeJavaScript介绍

暂无

代码示例

代码示例来源:origin: org.aperteworkflow/gui-commons

public static void unregisterClosingWarning(Window window) {
  window.executeJavaScript(UNREGISTER_CLOSE_WARNING);
}

代码示例来源:origin: org.aperteworkflow/editor

/**
 * Execute the JavaScript
 *
 * @param script Script content
 */
private void executeScript(String script) {
  logger.fine("Executing javascript: `" + script + "`");
  window.executeJavaScript(script);
}

代码示例来源:origin: org.aperteworkflow/gui-commons

public static void registerClosingWarning(Window window, String warningMessage) {
  String msg = String.format(REGISTER_CLOSE_WARNING, warningMessage);
  window.executeJavaScript(msg);
}

代码示例来源:origin: net.sf.itcb.common/itcb-common-web-vaadin

@Override
public void handleAfterChangePage(String pageRef, ItcbComponent itcbComponent, ReloadOrder reloadOrder,
    ExecutedAction executedAction, Object requestContextVar) {
        if(itcbComponent instanceof ItcbPage && executedAction.equals(ExecutedAction.FULL_LOAD)) {
       ItcbPage page = (ItcbPage) itcbComponent;
          // Google Analytics
       // Track the page view
       StringBuffer sb = new StringBuffer(50);
       sb.append("_gaq.push(['_setAccount', '")
         .append(accountId)
         .append("'],")
         .append("['_trackPageview', '")
         .append(prefix)
         .append(pageRef)
         .append(".html']);");
       sb.append("_gaq.push(['_trackPageLoadTime']);");
       page.getApplication().getMainWindow().executeJavaScript(sb.toString());
     }
  
}

代码示例来源:origin: net.sf.itcb.common/itcb-common-web-vaadin

@Override
public void displayPreviousPage() {
  getApplication().getMainWindow().executeJavaScript("history.back()");
}

代码示例来源:origin: org.aperteworkflow/gui-commons

@Override
protected void handleRequest(PortletRequest request, PortletResponse response) throws PortletException, IOException
{
  super.handleRequest(request,response);
  if (application != null) {
    for(Window window: application.getWindows()) {
      window.executeJavaScript("hideLoadingMessage('"+getLoaderTagId(request.getWindowID(), getPortletConfig())+"');");
    }
  }
}

相关文章