Examples of JSReference


Examples of org.ajax4jsf.javascript.JSReference

  public JSReference getDayStyleClass(FacesContext context, UIComponent component) {
    UICalendar calendar = (UICalendar) component;
    String dayStyleClass = (String) calendar.getAttributes().get(
        "dayStyleClass");
    if (dayStyleClass != null && dayStyleClass.length() != 0) {
      return new JSReference(dayStyleClass);
    }
   
    return null;
  }
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

    if (oncomplete != null) {
      oncompleteDefinition.addToBody(oncomplete);
    }

    options.put("oncomplete", oncompleteDefinition);
    JSReference requestValue = new JSReference("requestValue");
    ajaxFunction.addParameter(options);
    JSFunctionDefinition definition = new JSFunctionDefinition();
    definition.addParameter(requestValue);
    definition.addToBody(ajaxFunction);
    return definition;
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

        definition.addParameter("event");
        definition.addParameter("columnId");
        definition.addParameter("menuId");
        JSFunction invocation = new JSFunction(
                "Richfaces.componentControl.performOperation");
        invocation.addParameter(new JSReference("event"));
        invocation.addParameter(new JSReference("event.type"));
        invocation.addParameter(new JSReference("menuId"));
        invocation.addParameter("show");
        // invocation.addParameter(new JSReference("{'columnId':columnId}"));
        invocation.addParameter(new JSReference("{}"));
        invocation.addParameter(Boolean.FALSE);
        definition.addToBody(invocation.toScript()).addToBody(";\n");
        return definition;
    }
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

    if (oncomplete != null) {
      oncompleteDefinition.addToBody(oncomplete);
    }

    options.put("oncomplete", oncompleteDefinition);
    JSReference requestValue = new JSReference("requestValue");
    ajaxFunction.addParameter(options);
    JSFunctionDefinition definition = new JSFunctionDefinition();
    definition.addParameter(requestValue);
    definition.addToBody(ajaxFunction);
    writer.write(definition.toScript());
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

    public String getOnClick(FacesContext context, UIComponent component) {
        UISimpleTogglePanel tgComp = (UISimpleTogglePanel) component;

        String switchType = tgComp.getSwitchType();
        StringBuffer onClick = new StringBuffer();
      JSReference eventRef = new JSReference("event");
      String panelId = tgComp.getClientId(context);

  if (UISimpleTogglePanel.CLIENT_SWITCH_TYPE.equals(switchType)) {
            // Client
            JSFunction function = new JSFunction("SimpleTogglePanelManager.toggleOnClient");
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

      if (slider.isSubmitOnSlide()) {
      options.append(",onSlideSubmit: function(event, v) { updateSlider1(event, v);}");
  }
        options.append("}");

        JSReference reference = new JSReference(options.toString());
       
      JSFunction function = new JSFunction("Richfaces.DFSControl.Slider");
      function.addParameter(clientId + "slider-handle");
      function.addParameter(clientId + "slider-track");
      function.addParameter(reference);
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

    .buildAjaxFunction(tree, context);
    Map eventOptions = AjaxRendererUtils.buildEventOptions(context, tree);
    Map parameters = (Map) eventOptions.get("parameters");
    parameters.remove(id);
    parameters.put(id + UITree.SELECTED_NODE_PARAMETER_NAME,
        new JSReference("event.selectedNode"));
    function.addParameter(eventOptions);
    StringBuffer buffer = new StringBuffer();
    function.appendScript(buffer);
    buffer.append("; return false;");
    return buffer.toString();
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

                ScriptUtils.toScript(eventOptions)).addToBody(";\n");
        definition.addToBody("options.parameters['" + SORT_FILTER_PARAMETER
                + "'] = columnId;\n");
        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }// getSortFunction
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

                ScriptUtils.toScript(eventOptions)).addToBody(";\n");
        definition
                .addToBody("options.parameters['groupIndex'] = groupIndex;\n");
        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }// getSortFunction
View Full Code Here

Examples of org.ajax4jsf.javascript.JSReference

        definition
                .addToBody("options.parameters['columnWidths'] = columnWidths;\n");

        JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table,
                context);
        ajaxFunction.addParameter(new JSReference("options"));
        definition.addToBody(ajaxFunction.toScript()).addToBody(";\n");
        return definition;
    }
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.