Examples of HtmlSelectBooleanCheckbox


Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

    public void setUp() throws Exception
    {
        super.setUp();

        selectManyCheckbox = new HtmlSelectManyCheckbox();
        selectBooleanCheckbox = new HtmlSelectBooleanCheckbox();

        writer = new MockResponseWriter(new StringWriter(), null, null);
        facesContext.setResponseWriter(writer);

        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

      }
    }
   
    else if (controlType.equals("textarea")) {
     
      HtmlSelectBooleanCheckbox inputSelectBooleanCheckbox = new HtmlSelectBooleanCheckbox();
      inputSelectBooleanCheckbox.setReadonly(isReadOnly() || col.isAutoGenerated());
      inputSelectBooleanCheckbox.setLabel(getLabelString());
      input = inputSelectBooleanCheckbox;
    } else if (controlType.equals("password")) {
      HtmlSelectBooleanCheckbox inputSelectBooleanCheckbox = new HtmlSelectBooleanCheckbox();
      inputSelectBooleanCheckbox.setReadonly(isReadOnly() || col.isAutoGenerated());
      inputSelectBooleanCheckbox.setLabel(getLabelString());
      input = inputSelectBooleanCheckbox;
    } else if (controlType.equals("select")) {
      HtmlSelectOneMenu inputSelectOneMenu = new HtmlSelectOneMenu();
      inputSelectOneMenu.setReadonly(isReadOnly() || col.isAutoGenerated());
      addSelectItems(inputSelectOneMenu);
      inputSelectOneMenu.setLabel(getLabelString());
      input = inputSelectOneMenu;

    } else if (controlType.equals("checkbox")) {
      HtmlSelectBooleanCheckbox inputSelectBooleanCheckbox = new HtmlSelectBooleanCheckbox();
      inputSelectBooleanCheckbox.setReadonly(isReadOnly() || col.isAutoGenerated());
      inputSelectBooleanCheckbox.setLabel(getLabelString());
      input = inputSelectBooleanCheckbox;
    }
   
    else if (controlType.equals("phone")) {
      HtmlInputText inputText = new HtmlInputText();
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

{
  if (!(component instanceof HtmlSelectBooleanCheckbox))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no HtmlSelectBooleanCheckbox");
  }
  HtmlSelectBooleanCheckbox comp = (HtmlSelectBooleanCheckbox)component;

  super.setProperties(component);

  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_validator != null)
  {
    comp.addValidator(new MethodExpressionValidator(_validator));
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_label != null)
  {
    comp.setValueExpression("label", _label);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_required != null)
  {
    comp.setValueExpression("required", _required);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_requiredMessage != null)
  {
    comp.setValueExpression("requiredMessage", _requiredMessage);
  }
  if (_onselect != null)
  {
    comp.setValueExpression("onselect", _onselect);
  }
  if (_converterMessage != null)
  {
    comp.setValueExpression("converterMessage", _converterMessage);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_valueChangeListener != null)
  {
    comp.addValueChangeListener(new MethodExpressionValueChangeListener(_valueChangeListener));
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_validatorMessage != null)
  {
    comp.setValueExpression("validatorMessage", _validatorMessage);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_onchange != null)
  {
    comp.setValueExpression("onchange", _onchange);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_readonly != null)
  {
    comp.setValueExpression("readonly", _readonly);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_immediate != null)
  {
    comp.setValueExpression("immediate", _immediate);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_converter != null)
  {
    if (!_converter.isLiteralText())
    {
      comp.setValueExpression("converter", _converter);
    }
    else
    {
      String s = _converter.getExpressionString();
      if (s != null)
      {
        Converter converter = getFacesContext().getApplication().
          createConverter(s);
        comp.setConverter(converter);
      }
    }
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
}
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

    private HtmlSelectBooleanCheckbox createInverseCheckBox(FacesContext context, UIComponent rowContainer) {
        HtmlPanelGroup inverseCheckBoxContainer = (HtmlPanelGroup) Components.createChildComponent(context, rowContainer, HtmlPanelGroup.COMPONENT_TYPE, INVERSE_CHECKBOX_CONTAINER_SUFFIX, 1);

        inverseCheckBoxContainer.setStyleClass(DEFAULT_ROW_ITEM_CHECKBOX_CLASS);
        HtmlSelectBooleanCheckbox inverseCheckBox = (HtmlSelectBooleanCheckbox) Components.createChildComponent(context, inverseCheckBoxContainer, HtmlSelectBooleanCheckbox.COMPONENT_TYPE, CHECKBOX_SUFFIX);
        //TODO: add onclick that will send ajax request to update component state       
        inverseCheckBox.setStyleClass(DEFAULT_INVERSE_CHECKBOX_CLASS);
        inverseCheckBox.setTitle(INVERSE_LABEL);

        HtmlOutputText inverseLabel = (HtmlOutputText) Components.createChildComponent(context, inverseCheckBoxContainer, HtmlOutputText.COMPONENT_TYPE, LABEL_SUFFIX);
        inverseLabel.setStyleClass(DEFAULT_INVERSE_LABEL_CLASS);
        inverseLabel.setValue(INVERSE_LABEL);
        return inverseCheckBox;
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

        }
        HtmlPanelGroup inverseContainer = getInverseCheckBoxContainer(rowContainer);
        if (inverseContainer == null) {
            return null;
        }
        HtmlSelectBooleanCheckbox inverseCheckBox = getInverseCheckBox(inverseContainer);
        return inverseCheckBox;
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

    public HtmlPanelGroup preparateOperationComponentHierarchy(
            FacesContext context,
            UIComponent rowContainer,
            CompositeFilter compositeFilter) throws IOException {
        HtmlSelectBooleanCheckbox inverseCheckBox = findInverseCheckBox(context, compositeFilter);
        if (inverseCheckBox == null) {
            inverseCheckBox = createInverseCheckBox(context, rowContainer);
        }
        initInverseCheckBox(inverseCheckBox);
        HtmlPanelGroup operationSelectorContainer = getOperationSelectorContainer(rowContainer);
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

        String propertyValue = (String) propertySelector.getValue();
        FilterProperty newProperty = compositeFilter.getFilterPropertyByTitle(propertyValue);
        boolean propertyModified = property == null ? newProperty != null : newProperty != null && !newProperty.getName().equals(property.getName());
        property = newProperty;
        DropDownField operationSelector = findOperationSelector(compositeFilter);
        HtmlSelectBooleanCheckbox inverseCheckBox = findInverseCheckBox(context, compositeFilter);
        if (propertyModified || property == null || operationSelector == null || inverseCheckBox == null) {
            operation = null;
            parametersEditor = null;
            return null;
        }
        FilterCondition newOperation = (FilterCondition) operationSelector.getValue();
        inverse = (Boolean) inverseCheckBox.getValue();
        boolean operationModified = newOperation == null ? operation == null : !newOperation.equals(operation);
        operation = newOperation;
        if (operation == null || parametersEditor == null) {
            parametersEditor = null;
            return null;
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlSelectBooleanCheckbox();
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox

    public void setUp() throws Exception
    {
        super.setUp();

        selectManyCheckbox = new HtmlSelectManyCheckbox();
        selectBooleanCheckbox = new HtmlSelectBooleanCheckbox();

        writer = new MockResponseWriter(new StringWriter(), null, null);
        facesContext.setResponseWriter(writer);

        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
View Full Code Here

Examples of javax.faces.component.html.HtmlSelectBooleanCheckbox


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlSelectBooleanCheckbox();
    }
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.