Package org.ajax4jsf.javascript

Examples of org.ajax4jsf.javascript.JSFunction.toScript()


            writer.endUpdate();

            JSFunction function = new JSFunction("RichFaces.component", component.getClientId(context));

            ExtendedPartialViewContext partialContext = ExtendedPartialViewContext.getInstance(context);
            partialContext.appendOncomplete(function.toScript() + ".__updateSelectionFromInput();");
        } else {
            throw new IllegalArgumentException(metaComponentId);
        }

        // TODO Auto-generated method stub
View Full Code Here


        Map<String, Object> options = new HashMap<String, Object>();
        options.put("ajaxEventOptions", ajaxOptions.getParameters());
        function.addParameter(options);

        writer.writeText(function.toScript(), null);
        writer.endElement(HtmlConstants.SCRIPT_ELEM);
    }

    @Override
    public void encodeHiddenInput(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
View Full Code Here

        super(EVENT, CLIENT_ID, ELEMENT, DISABLE_AJAX);
    }

    public String createCallScript(String clientId, String sourceId) {
        JSFunction callFunction = new JSFunction(getName(), EVENT_REF, clientId, null != sourceId ? sourceId : JSReference.THIS);
        return callFunction.toScript();
    }

    protected void appendParameters(Appendable target) throws IOException {
    }
View Full Code Here

            jsFunction.addParameter(toggleId);
            Map<String, Object> options = encodeOptions(context, toggleControl, subTable);
            jsFunction.addParameter(options);

            writer.startElement(HtmlConstants.SCRIPT_ELEM, subTable);
            writer.writeText(jsFunction.toScript(), null);
            writer.endElement(HtmlConstants.SCRIPT_ELEM);
        }
    }

    private boolean isEmpty(String value) {
View Full Code Here

            options.put(ENABLED, true);
        }
        function.addParameter(component.getClientId(context));
        function.addParameter(options);
        // function.appendScript(script);
        writer.writeText(function.toScript(), null);

        writer.endElement(HtmlConstants.SCRIPT_ELEM);

        writer.endElement(rootElementName);
    }
View Full Code Here

        JSFunction eventFunction = new JSFunction(FUNC_NAME);
        eventFunction.addParameter(new JSReference(REF_EVENT));
        eventFunction.addParameter(parameters);

        StringBuffer execution = new StringBuffer();
        execution.append(eventFunction.toScript());
        execution.append("; return false;");
        return execution.toString();
    }

    protected List<Object> createSignature(ComponentControlBehavior behavior) {
View Full Code Here

        if (!options.isEmpty()) {
            statusConstructor.addParameter(options);
        }

        writer.writeText(statusConstructor.toScript(), null);
        writer.endElement(HtmlConstants.SCRIPT_ELEM);

        writer.endElement(HtmlConstants.SPAN_ELEM);
    }
View Full Code Here

    attachContextMenuFunction.addParameter(clientId);
    attachContextMenuFunction.addParameter(contextMenu.getEvent());
    attachContextMenuFunction.addParameter(params);

    if (isImmediate) {
        attachContextMenuBuffer.append(attachContextMenuFunction.toScript());
    } else {
      if (isOnAvailable) {
        JSFunction availableFunction = new JSFunction("Richfaces.onAvailable");
          availableFunction.addParameter(clientId);
        availableFunction.addParameter(new JSBind(attachContextMenuFunction, "contextMenu"));
View Full Code Here

    } else {
      if (isOnAvailable) {
        JSFunction availableFunction = new JSFunction("Richfaces.onAvailable");
          availableFunction.addParameter(clientId);
        availableFunction.addParameter(new JSBind(attachContextMenuFunction, "contextMenu"));
          attachContextMenuBuffer.append(availableFunction.toScript());
         
      } else if (isOnLoad) {
          JSFunction onloadFunction = new JSFunction("jQuery(document).ready");
          onloadFunction.addParameter(new JSBind(attachContextMenuFunction, "contextMenu"));
View Full Code Here

         
      } else if (isOnLoad) {
          JSFunction onloadFunction = new JSFunction("jQuery(document).ready");
          onloadFunction.addParameter(new JSBind(attachContextMenuFunction, "contextMenu"));

          attachContextMenuBuffer.append(onloadFunction.toScript());
      }
    }

    attachContextMenuBuffer.append(";");
      }
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.