Code example for Node

Methods: appendChild, getOwnerDocument

0
    SwfObjectConfig config;
    try { 
      config = getSwfConfig(tag, processor);
    } catch (RuntimeException re) {
      // Record the processing error into the output 
      Element err = result.getOwnerDocument().createElement("span");
      err.setTextContent("Failed to process os:Flash tag: " +
          StringEscapeUtils.escapeHtml4(re.getMessage()));
      result.appendChild(err);
      return; 
    } 
 
    // Bind the security token to the flashvars if its available 
    String st = processor.getTemplateContext().getGadget()
        .getContext().getParameter("st"); 
    if (!Strings.isNullOrEmpty(st)) {
      String stVar = "st=" + Utf8UrlCoder.encode(st);
      if (Strings.isNullOrEmpty(config.flashvars)) {
        config.flashvars = stVar;
      } else { 
        config.flashvars += '&' + stVar;