Package org.apache.myfaces.tobago.component

Examples of org.apache.myfaces.tobago.component.UIIn


    Assert.assertEquals("tobago-in tobago-in-markup-disabled", Classes.create(in).getStringValue());
  }

  @Test
  public void testReadonly() {
    final UIIn in = (UIIn) CreateComponentUtils.createComponent(
        getFacesContext(), ComponentTypes.IN, RendererTypes.IN, "in");
    in.setReadonly(true);
    updateCurrentMarkup(in);
    Assert.assertEquals("tobago-in tobago-in-markup-readonly", Classes.create(in).getStringValue());
  }
View Full Code Here


    Assert.assertEquals("tobago-in tobago-in-markup-readonly", Classes.create(in).getStringValue());
  }

  @Test
  public void testDisabledReadonly() {
    final UIIn in = (UIIn) CreateComponentUtils.createComponent(
        getFacesContext(), ComponentTypes.IN, RendererTypes.IN, "in");
    in.setDisabled(true);
    in.setReadonly(true);
    updateCurrentMarkup(in);
    Assert.assertEquals(
        "tobago-in tobago-in-markup-disabled tobago-in-markup-readonly", Classes.create(in).getStringValue());
  }
View Full Code Here

        "tobago-in tobago-in-markup-disabled tobago-in-markup-readonly", Classes.create(in).getStringValue());
  }

  @Test
  public void testError() {
    final UIIn in = (UIIn) CreateComponentUtils.createComponent(
        getFacesContext(), ComponentTypes.IN, RendererTypes.IN, "in");
    in.setValid(false);
    updateCurrentMarkup(in);
    Assert.assertEquals("tobago-in tobago-in-markup-error", Classes.create(in).getStringValue());
  }
View Full Code Here

    Assert.assertEquals("tobago-in tobago-in-markup-error", Classes.create(in).getStringValue());
  }

  @Test
  public void testMarkup() {
    final UIIn in = (UIIn) CreateComponentUtils.createComponent(
        getFacesContext(), ComponentTypes.IN, RendererTypes.IN, "in");
    in.setMarkup(Markup.valueOf("important"));
    updateCurrentMarkup(in);
    Assert.assertEquals("tobago-in tobago-in-markup-important", Classes.create(in).getStringValue());
  }
View Full Code Here

    Assert.assertEquals("tobago-in tobago-in-markup-important", Classes.create(in).getStringValue());
  }

  @Test
  public void testSub() {
    final UIIn in = (UIIn) CreateComponentUtils.createComponent(
        getFacesContext(), ComponentTypes.IN, RendererTypes.IN, "in");
    Assert.assertEquals("tobago-in-sub", Classes.create(in, "sub").getStringValue());
  }
View Full Code Here

    Assert.assertEquals("tobago-in-sub", Classes.create(in, "sub").getStringValue());
  }

  @Test
  public void testMixed() {
    final UIIn in = (UIIn) CreateComponentUtils.createComponent(
        getFacesContext(), ComponentTypes.IN, RendererTypes.IN, "in");
    in.setDisabled(true);
    in.setReadonly(true);
    in.setValid(false);
    in.setMarkup(Markup.valueOf("important,deleted"));
    updateCurrentMarkup(in);
    Assert.assertEquals("tobago-in-sub tobago-in-sub-markup-important tobago-in-sub-markup-deleted "
        + "tobago-in-sub-markup-disabled tobago-in-sub-markup-readonly tobago-in-sub-markup-error",
        Classes.create(in, "sub").getStringValue());
  }
View Full Code Here

  private List<UIColumn> createSolarArrayColumns() {

    List<UIColumn> columns = new ArrayList<UIColumn>(3);

    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIIn in = (UIIn)
        CreateComponentUtils.createComponent(facesContext, UIIn.COMPONENT_TYPE, RendererTypes.IN, "sac1i");
    in.setValueBinding(
        Attributes.VALUE, facesContext.getApplication().createValueBinding("#{luminary.population}"));

    columns.add(CreateComponentUtils.createColumn(
        "#{overviewBundle.solarArrayPopulation}", "true", null, in, "sac1"));
View Full Code Here

  private List<UIColumn> createSolarArrayColumns() {

    List<UIColumn> columns = new ArrayList<UIColumn>(3);

    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIIn in = (UIIn)
        CreateComponentUtils.createComponent(facesContext, UIIn.COMPONENT_TYPE, RendererTypes.IN, "sac1i");
    in.setValueBinding(
        Attributes.VALUE, facesContext.getApplication().createValueBinding("#{luminary.population}"));

    columns.add(CreateComponentUtils.createColumn(
        "#{overviewBundle.solarArrayPopulation}", "true", null, in, "sac1"));
View Full Code Here

    if (!(component instanceof UIIn)) {
      LOG.error("Wrong type: Need " + UIIn.class.getName() + ", but was " + component.getClass().getName());
      return;
    }

    final UIIn input = (UIIn) component;
    final MethodBinding methodBinding = input.getSuggestMethod();
    final AutoSuggestItems items
            = createAutoSuggestItems(methodBinding.invoke(facesContext, new Object[]{input}));
    final List<AutoSuggestItem> suggestItems = items.getItems();
    final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
View Full Code Here

      HtmlRendererUtils.renderFocusId(facesContext, input);

      // input suggest
      if (renderAjaxSuggest) {

        UIIn in = (UIIn) input;
        int suggestMinChars = in.getSuggestMinChars();
        int suggestDelay = in.getSuggestDelay();

        final String[] cmds = {
            "new Tobago.AutocompleterAjax(",
            "    '" + id + "',",
            "    " + required + ",",
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.component.UIIn

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.