Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlSelectManyListbox


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

  super.setProperties(component);

  if (_disabledClass != null)
  {
    comp.setValueExpression("disabledClass", _disabledClass);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_onselect != null)
  {
    comp.setValueExpression("onselect", _onselect);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_requiredMessage != null)
  {
    comp.setValueExpression("requiredMessage", _requiredMessage);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_onchange != null)
  {
    comp.setValueExpression("onchange", _onchange);
  }
  if (_immediate != null)
  {
    comp.setValueExpression("immediate", _immediate);
  }
  if (_enabledClass != null)
  {
    comp.setValueExpression("enabledClass", _enabledClass);
  }
  if (_size != null)
  {
    comp.setValueExpression("size", _size);
  }
  if (_validator != null)
  {
    comp.addValidator(new MethodExpressionValidator(_validator));
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  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 (_valueChangeListener != null)
  {
    comp.addValueChangeListener(new MethodExpressionValueChangeListener(_valueChangeListener));
  }
  if (_label != null)
  {
    comp.setValueExpression("label", _label);
  }
  if (_readonly != null)
  {
    comp.setValueExpression("readonly", _readonly);
  }
  if (_converterMessage != null)
  {
    comp.setValueExpression("converterMessage", _converterMessage);
  }
  if (_required != null)
  {
    comp.setValueExpression("required", _required);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_validatorMessage != null)
  {
    comp.setValueExpression("validatorMessage", _validatorMessage);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
}
View Full Code Here


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

  super.setProperties(component);

  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_enabledClass != null)
  {
    comp.setValueExpression("enabledClass", _enabledClass);
  }
  if (_valueChangeListener != null)
  {
    comp.addValueChangeListener(new MethodExpressionValueChangeListener(_valueChangeListener));
  }
  if (_label != null)
  {
    comp.setValueExpression("label", _label);
  }
  if (_required != null)
  {
    comp.setValueExpression("required", _required);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_onchange != null)
  {
    comp.setValueExpression("onchange", _onchange);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_requiredMessage != null)
  {
    comp.setValueExpression("requiredMessage", _requiredMessage);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  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 (_immediate != null)
  {
    comp.setValueExpression("immediate", _immediate);
  }
  if (_onselect != null)
  {
    comp.setValueExpression("onselect", _onselect);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_converterMessage != null)
  {
    comp.setValueExpression("converterMessage", _converterMessage);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_validator != null)
  {
    comp.addValidator(new MethodExpressionValidator(_validator));
  }
  if (_disabledClass != null)
  {
    comp.setValueExpression("disabledClass", _disabledClass);
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_readonly != null)
  {
    comp.setValueExpression("readonly", _readonly);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_validatorMessage != null)
  {
    comp.setValueExpression("validatorMessage", _validatorMessage);
  }
  if (_size != null)
  {
    comp.setValueExpression("size", _size);
  }
}
View Full Code Here

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

  super.setProperties(component);

  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_immediate != null)
  {
    comp.setValueExpression("immediate", _immediate);
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_size != null)
  {
    comp.setValueExpression("size", _size);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_onselect != null)
  {
    comp.setValueExpression("onselect", _onselect);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_validatorMessage != null)
  {
    comp.setValueExpression("validatorMessage", _validatorMessage);
  }
  if (_converterMessage != null)
  {
    comp.setValueExpression("converterMessage", _converterMessage);
  }
  if (_disabledClass != null)
  {
    comp.setValueExpression("disabledClass", _disabledClass);
  }
  if (_label != null)
  {
    comp.setValueExpression("label", _label);
  }
  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 (_readonly != null)
  {
    comp.setValueExpression("readonly", _readonly);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_required != null)
  {
    comp.setValueExpression("required", _required);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_validator != null)
  {
    comp.addValidator(new MethodExpressionValidator(_validator));
  }
  if (_requiredMessage != null)
  {
    comp.setValueExpression("requiredMessage", _requiredMessage);
  }
  if (_onchange != null)
  {
    comp.setValueExpression("onchange", _onchange);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_valueChangeListener != null)
  {
    comp.addValueChangeListener(new MethodExpressionValueChangeListener(_valueChangeListener));
  }
  if (_enabledClass != null)
  {
    comp.setValueExpression("enabledClass", _enabledClass);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
}
View Full Code Here


    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectManyListbox();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

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

        selectOneListbox = new HtmlSelectOneListbox();
        selectManyListbox = new HtmlSelectManyListbox();

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

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

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

        selectOneListbox = new HtmlSelectOneListbox();
        selectManyListbox = new HtmlSelectManyListbox();

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

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


    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectManyListbox();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

        Assert.assertNotNull(label1);
       
        HtmlSelectOneListbox select1 = (HtmlSelectOneListbox) form.findComponent("select1");
        Assert.assertNotNull(select1);
       
        HtmlSelectManyListbox select2 = (HtmlSelectManyListbox) form.findComponent("select2");
        Assert.assertNotNull(select2);
       
    }
View Full Code Here

*/
public class HtmlFormBuilderListbox extends HtmlFormBuilderItem {

    @Override
    public void renderView() {
        HtmlSelectManyListbox select = new HtmlSelectManyListbox();
        String[] valueArray = properties.getValues().split(";");
        for (int i = 0; i < valueArray.length; ++i) {
            UISelectItem item = new UISelectItem();
            item.setItemValue(valueArray[i]);
            item.setItemLabel(valueArray[i]);
            select.getChildren().add(item);
        }
        if (isDisabled()) {
            select.setDisabled(true);
        }
        if (value != null) {
            select.setValue(value.split(";"));
        }
        if (getDataUuid() != null) {
            select.setId(getDataUuid());
        }

        HtmlCustomOutputLabel output = new HtmlCustomOutputLabel(properties);

        addLabeledComponent(output, select);
View Full Code Here

        Assert.assertNotNull(label1);
       
        HtmlSelectOneListbox select1 = (HtmlSelectOneListbox) form.findComponent("select1");
        Assert.assertNotNull(select1);
       
        HtmlSelectManyListbox select2 = (HtmlSelectManyListbox) form.findComponent("select2");
        Assert.assertNotNull(select2);
       
    }
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlSelectManyListbox

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.