Package org.apache.myfaces.tobago.component

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


    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


  public void testFindDescendant() {
    final UIComponent p = CreateComponentUtils.createComponent(ComponentTypes.PANEL, RendererTypes.PANEL, "p");
    final UIComponent i = CreateComponentUtils.createComponent(ComponentTypes.IN, RendererTypes.IN, "i");
    p.getChildren().add(i);

    final UIIn in = ComponentUtils.findDescendant(p, UIIn.class);
    Assert.assertEquals(i, in);
  }
View Full Code Here

public class ClassesUnitTest extends AbstractTobagoTestBase {

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

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

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

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

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

    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

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.