Package org.primefaces.util

Examples of org.primefaces.util.WidgetBuilder


    }

    protected void encodeScript(FacesContext context, ColorPicker colorPicker) throws IOException {
    String clientId = colorPicker.getClientId(context);
        String value = (String) colorPicker.getValue();
        WidgetBuilder wb = getWidgetBuilder(context);
       
        wb.initWithDomReady("ColorPicker", colorPicker.resolveWidgetVar(), clientId, "colorpicker")
            .attr("mode", colorPicker.getMode())
            .attr("color", value, null);

        wb.finish();
    }
View Full Code Here


    writer.writeAttribute("id", clientId, "id");
    writer.endElement("div");
    }
   
    protected void encodeScript(FacesContext context, Growl growl) throws IOException {
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.initWithDomReady("Growl", growl.resolveWidgetVar(), growl.getClientId(context));
        wb.attr("sticky", growl.isSticky(), false)
            .attr("life", growl.getLife(), 6000)
            .attr("escape", growl.isEscape(), true)
            .append(",msgs:");
        encodeMessages(context, growl);
        wb.finish();
    }
View Full Code Here

    }
   
    protected void encodeScript(FacesContext context, SelectCheckboxMenu menu) throws IOException {
        String clientId = menu.getClientId(context);
       
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.initWithDomReady("SelectCheckboxMenu", menu.resolveWidgetVar(), clientId)
            .callback("onShow", "function()", menu.getOnShow())
            .callback("onHide", "function()", menu.getOnHide())
            .attr("scrollHeight", menu.getScrollHeight(), Integer.MAX_VALUE)
            .attr("appendTo", SearchExpressionFacade.resolveComponentForClient(context, menu, menu.getAppendTo()), null);
       
        if(menu.isFilter()) {
            wb.attr("filter", true)
                .attr("filterMatchMode", menu.getFilterMatchMode(), null)
                .nativeAttr("filterFunction", menu.getFilterFunction(), null)
                .attr("caseSensitive", menu.isCaseSensitive(), false);
        }
       
        wb.attr("panelStyle", menu.getPanelStyle(), null).attr("panelStyleClass", menu.getPanelStyleClass(), null);

        encodeClientBehaviors(context, menu);
       
        wb.finish();
    }
View Full Code Here

        writer.endElement("div");
    }

    protected void encodeScript(FacesContext context, SelectManyMenu menu) throws IOException {
        String clientId = menu.getClientId(context);
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.init("SelectManyMenu", menu.resolveWidgetVar(), clientId)
            .attr("disabled", menu.isDisabled(), false)
            .attr("showCheckbox", menu.isShowCheckbox(), false);
       
        if(menu.isFilter()) {
            wb.attr("filter", true)
                .attr("filterMatchMode", menu.getFilterMatchMode(), null)
                .nativeAttr("filterFunction", menu.getFilterFunction(), null)
                .attr("caseSensitive", menu.isCaseSensitive(), false);
        }
       
        wb.finish();
    }
View Full Code Here

        writer.endElement("input");
    }

    protected void encodeScript(FacesContext context, InputSlider inputSlider) throws IOException {
        String clientId = inputSlider.getClientId(context);
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.init("InputSlider", inputSlider.resolveWidgetVar(), clientId).finish();
    }
View Full Code Here

public class SelectManyCheckboxRenderer extends org.primefaces.component.selectmanycheckbox.SelectManyCheckboxRenderer {
   
    @Override   
    protected void encodeScript(FacesContext context, SelectManyCheckbox checkbox) throws IOException {
        String clientId = checkbox.getClientId(context);
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.init("SelectManyCheckbox", checkbox.resolveWidgetVar(), clientId).finish();
    }
View Full Code Here

        writer.endElement("div");
    }

    protected void encodeScript(FacesContext context, SelectOneListbox listbox) throws IOException {
        String clientId = listbox.getClientId(context);
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.init("SelectOneListbox", listbox.resolveWidgetVar(), clientId)
            .attr("disabled", listbox.isDisabled(), false);
       
        if(listbox.isFilter()) {
            wb.attr("filter", true)
                .attr("filterMatchMode", listbox.getFilterMatchMode(), null)
                .nativeAttr("filterFunction", listbox.getFilterFunction(), null)
                .attr("caseSensitive", listbox.isCaseSensitive(), false);
        }
       
        wb.finish();
    }
View Full Code Here

   
    @Override
  public void encodeScript(FacesContext context, InputTextarea inputTextarea) throws IOException {
    String clientId = inputTextarea.getClientId(context);
       
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.initWithDomReady("InputTextarea", inputTextarea.resolveWidgetVar(), clientId).finish();
  }
View Full Code Here

  }
 
  protected void encodeScript(FacesContext context, ImageCompare compare) throws IOException {
    String clientId = compare.getClientId(context);
       
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.init("ImageCompare", compare.resolveWidgetVar(), clientId, "imagecompare")
            .attr("handle", getResourceRequestPath(context, "imagecompare/handle.gif"))
            .attr("lt", getResourceRequestPath(context, "imagecompare/lt-small.png"))
            .attr("rt", getResourceRequestPath(context, "imagecompare/rt-small.png"));

        wb.finish();
  }
View Full Code Here

   
    protected void encodeScript(FacesContext context, PhotoCam cam) throws IOException {
    String clientId = cam.getClientId(context);
        String camera = getResourceRequestPath(context, "photocam/photocam.swf");
       
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.initWithDomReady("PhotoCam", cam.resolveWidgetVar(), clientId)
            .attr("camera", camera);
       
        if(cam.getUpdate() != null) wb.attr("update", SearchExpressionFacade.resolveComponentsForClient(context, cam, cam.getUpdate()));
        if(cam.getProcess() != null) wb.attr("process", SearchExpressionFacade.resolveComponentsForClient(context, cam, cam.getProcess()));

       wb.finish();
  }
View Full Code Here

TOP

Related Classes of org.primefaces.util.WidgetBuilder

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.