Examples of writeJavascript()


Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

    writer.writeClassAttribute();
    writer.writeIdAttribute(clientId);
    if (style != null) {
      writer.writeStyleAttribute(style);
    }
    writer.writeJavascript("Tobago.addAjaxComponent(\"" + clientId + "\")");

    encodeBeginInner(facesContext, writer, component);
  }

  private void encodeBeginInner(FacesContext facesContext,
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

    writer.endElement(HtmlConstants.SPAN);
    UIComponent facet = component.getFacet("complete");
    if (model.getValue() == model.getMaximum() && facet != null
        && facet instanceof UICommand) {
      UICommand command = (UICommand) facet;
      writer.writeJavascript("Tobago.submitAction('" + command.getClientId(facesContext) + "');");
    }

  }

}
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

      StringBuilder script = new StringBuilder();
      for (String scriptText : scriptTexts) {
        script.append(scriptText);
        script.append('\n');
      }
      writer.writeJavascript(script.toString());
    } else {
      HtmlRendererUtil.writeScriptLoader(facesContext, scripts, scriptTexts);
    }

    writer.endElement(HtmlConstants.DIV);
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

    }

    writer.startElement(HtmlConstants.HTML, null);
    writer.startElement(HtmlConstants.HEAD, null);

    writer.writeJavascript("var TbgHeadStart = new Date();");

    // meta
    // TODO duplicate; see PageTag.doStartTag()
//    writer.startElement(HtmlConstants.META, null);
//    writer.writeAttribute("http-equiv", "Content-Type", null);
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

    writer.endElement(HtmlConstants.TABLE);
    UIComponent facet = component.getFacet("complete");
    if (model.getValue() == model.getMaximum() && facet != null
        && facet instanceof UICommand) {
      UICommand command = (UICommand) facet;
      writer.writeJavascript("Tobago.submitAction('" + command.getClientId(facesContext) + "');");
    }
  }
}
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

    }

    // focus id
    String focusId = page.getFocusId();
    if (focusId != null) {
      writer.writeJavascript("Tobago.focusId = '" + focusId + "';");
    }

    if (component.getFacets().containsKey(FACET_ACTION)) {
      UIComponent command = component.getFacet(FACET_ACTION);
      if (command != null && command.isRendered()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

        LOG.debug("write scriptblock " + ++debugCounter + " :\n" + scriptBlock);
      }
      script.append(scriptBlock);
      script.append('\n');
    }
    writer.writeJavascript(script.toString());

    String clientId = page.getClientId(facesContext);

    String defaultActionId = page.getDefaultActionId() != null ? page.getDefaultActionId() : "";
    writer.endElement(HtmlConstants.HEAD);
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

    images.append(ResourceManagerUtil.getImageWithPath(facesContext, "image/tobago-overlay-background.png"));
    images.append("';\n");
    images.append("Tobago.OVERLAY_WAIT = '");
    images.append(ResourceManagerUtil.getImageWithPath(facesContext, "image/tobago-overlay-wait.gif"));
    images.append("';\n");
    writer.writeJavascript(images.toString());

    if (debugMode) {
      final String[] jsFiles = new String[]{
          "script/effects.js",
          "script/dragdrop.js",
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

          "script/logging.js"
      };
      final String[] jsCommand = new String[]{"new LOG.LogArea({hide: " + hideClientLogging + "});"};
      HtmlRendererUtil.writeScriptLoader(facesContext, jsFiles, jsCommand);
    }
    writer.writeJavascript("TbgTimer.startBody = new Date();");

    writer.startElement(HtmlConstants.FORM, page);
    writer.writeNameAttribute(
        clientId + SUBCOMPONENT_SEP + "form");
    writer.writeAttribute(HtmlAttributes.ACTION, formAction, true);
View Full Code Here

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeJavascript()

      HtmlRendererUtil.writeScriptLoader(facesContext, null,
          logMessages.toArray(new String[logMessages.size()]));
    }

    writer.writeJavascript("TbgTimer.endBody = new Date();");
    writer.endElement(HtmlConstants.BODY);
    writer.endElement(HtmlConstants.HTML);

    if (LOG.isDebugEnabled()) {
      LOG.debug("unused AccessKeys    : "
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.