Package org.primefaces.component.tabview

Examples of org.primefaces.component.tabview.Tab


   
    for(Iterator<UIComponent> kids = accordionPanel.getChildren().iterator(); kids.hasNext();) {
      UIComponent kid = (UIComponent) kids.next();
     
      if(kid.isRendered() && kid instanceof Tab) {
        Tab tab = (Tab) kid;
       
        writer.startElement("li", null);
        writer.startElement("p", null);
        if(tab.getTitle() != null)
          writer.write(tab.getTitle());
        writer.endElement("p");
       
        writer.startElement("div", null);
        renderChild(facesContext, tab);
        writer.endElement("div");
View Full Code Here


  /**
   * Speichert den <b>activeTab</b> in einer Eigenschaft.
   * @param event Hinweis auf den Parent und somit auf den activeIndex.
   */
  public void onTabChange(TabChangeEvent event) {
        Tab activeTab = event.getTab();
        TabView parent=(TabView)activeTab.getParent();
        activeIndex=parent.getActiveIndex();
  }
View Full Code Here

   */
  @Test
  public void testOnTabChange() {
    final int ACTIVE_INDEX = 5;
    TabChangeEvent event = mock(TabChangeEvent.class);
    Tab tab = mock(Tab.class);
    TabView parent = mock(TabView.class);
    when(event.getTab()).thenReturn(tab);
    when(tab.getParent()).thenReturn(parent);
    when(parent.getActiveIndex()).thenReturn(ACTIVE_INDEX);

    proband.onTabChange(event); // Test

    assertEquals(ACTIVE_INDEX, proband.getActiveIndex());
View Full Code Here

TOP

Related Classes of org.primefaces.component.tabview.Tab

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.