Package org.ajax4jsf.renderkit

Examples of org.ajax4jsf.renderkit.ComponentVariables


    return javax.faces.component.UIComponent.class;
  }

 
  public void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component ) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
    doEncodeBegin(writer, context, (javax.faces.component.UIComponent)component, variables );
  }   
View Full Code Here


writer.endElement("th");

  }   
 
  public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
    doEncodeEnd(writer, context, (javax.faces.component.UIComponent)component, variables );

    ComponentsVariableResolver.removeVariables(this, component);
  }   
View Full Code Here

writer.endElement("div");

  }   
 
  public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
    doEncodeEnd(writer, context, (org.richfaces.ui.component.UIInsert)component, variables );

    ComponentsVariableResolver.removeVariables(this, component);
  }   
View Full Code Here

writer.endElement("div");

  }   
 
  public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
    doEncodeEnd(writer, context, (org.richfaces.ui.component.UIStates)component, variables );

    ComponentsVariableResolver.removeVariables(this, component);
  }   
View Full Code Here

writer.endElement("div");

  }   
 
  public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
    doEncodeEnd(writer, context, (org.richfaces.ui.component.UIState)component, variables );

    ComponentsVariableResolver.removeVariables(this, component);
  }   
View Full Code Here

   */
  public void encodeInitialScript(FacesContext context,
      UIComponent component, String state) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    UIProgressBar progressBar = (UIProgressBar) component;
    ComponentVariables variables = ComponentsVariableResolver.getVariables(
        this, component);
    StringBuffer script = new StringBuffer();
    String clientId = component.getClientId(context);
    String containerId = ((UIComponent) AjaxRendererUtils
        .findAjaxContainer(context, component)).getClientId(context);
    String mode = (String) component.getAttributes().get("mode");
    UIComponent form = AjaxRendererUtils.getNestingForm(component);
    String formId = "";
    if (form != null) {
      formId = form.getClientId(context);
    } else if ("ajax".equals(mode)) {
      // Ignore form absent. It can be rendered by forcing from any
      // component
      // throw new FaceletException("Progress bar component in ajax mode
      // should be placed inside the form");
    }
    Number minValue = getNumber(component.getAttributes().get("minValue"));
    Number maxValue = getNumber(component.getAttributes().get("maxValue"));
    Number value = (Number) variables.getVariable("value");
    StringBuffer markup = getMarkup(context, component);

    script.append("new ProgressBar('").append(clientId).append("','") // id
        .append(containerId).append("','") // containerId
        .append(formId).append("','") // formId
View Full Code Here

   * @throws IOException
   */
  public void encodeProgressState(FacesContext context,
      UIComponent component, boolean isAjaxMode) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    ComponentVariables variables = ComponentsVariableResolver.getVariables(
        this, component);
    String clientId = component.getClientId(context);
    String styleClass = (String) variables.getVariable("styleClass");
    boolean isSimple = isSimpleMarkup(component);
    String style = (String) component.getAttributes().get("style");
    if (null==style) style="";
    String shellClass = (!isSimple) ? "rich-progress-bar-shell-dig "
        : "rich-progress-bar-shell ";
View Full Code Here

   */
  public void encodeProgressBar(FacesContext context, UIComponent component,
      boolean isSimple) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    String clientId = component.getClientId(context);
    ComponentVariables variables = ComponentsVariableResolver.getVariables(
        this, component);

    Number value = (Number) variables.getVariable("percent");

    String width = String.valueOf(value.intValue());
    String style = (String) component.getAttributes().get("style");
    if (null==style) style="";

View Full Code Here

   * @throws IOException
   */
  @SuppressWarnings("unchecked")
  private String getActionScript(FacesContext context, UIComponent component,
      String action, Object oncomplete) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(
        this, component);
    String clientId = component.getClientId(context);
    String containerId = (String) variables.getVariable("containerId");
    JSFunction ajaxFunction = new JSFunction(
        AjaxRendererUtils.AJAX_FUNCTION_NAME);
    ajaxFunction.addParameter(containerId);
    ajaxFunction.addParameter(new JSReference("formId"));
    ajaxFunction.addParameter(new JSReference("event"));
View Full Code Here

writer.endElement("div");

  }   
 
  public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
    doEncodeEnd(writer, context, (org.richfaces.component.UIMenuSeparator)component, variables );

    ComponentsVariableResolver.removeVariables(this, component);
  }   
View Full Code Here

TOP

Related Classes of org.ajax4jsf.renderkit.ComponentVariables

Copyright © 2018 www.massapicom. 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.