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;
       
        //title
        writer.startElement("h3", null);
        writer.startElement("a", null);
        writer.writeAttribute("href", "#", null);
        if(tab.getTitle() != null) {
          writer.write(tab.getTitle());
        }
        writer.endElement("a");
        writer.endElement("h3");
       
        //content
View Full Code Here


    writer.write(",navHeaders:new Array(");
   
    for(Iterator<UIComponent> kids = slider.getChildren().iterator(); kids.hasNext();) {
      UIComponent kid = kids.next();
      if(kid.isRendered() && kid instanceof Tab) {
        Tab tab = (Tab) kid;
       
        writer.write("'" + tab.getTitle() + "'");
       
        if(kids.hasNext())
          writer.write(",");
      }
    }
View Full Code Here

   
    writer.startElement("ul", slider);
   
    for(UIComponent kid : slider.getChildren()) {
      if(kid.isRendered() && kid instanceof Tab) {
        Tab tab = (Tab) kid;
       
        writer.startElement("li", null);
        renderChild(facesContext, tab);
        writer.endElement("li");
      }
View Full Code Here

    String defaultStep = null;
    for(Iterator<UIComponent> children = wizard.getChildren().iterator(); children.hasNext();) {
      UIComponent child = children.next();

      if(child instanceof Tab && child.isRendered()) {
        Tab tab = (Tab) child;
        if(defaultStep == null)
          defaultStep = tab.getId();
       
        if(!firstStep)
          writer.write(",");
        else
          firstStep = false;
       
        writer.write("'" + tab.getId() + "'");
      }
    }
    writer.write("]");
   
    //current step
View Full Code Here

  }

  protected void encodeCurrentStep(FacesContext facesContext, Wizard wizard) throws IOException {
    for(UIComponent child : wizard.getChildren()) {
      if(child instanceof Tab && child.isRendered()) {
        Tab tab = (Tab) child;
       
        if((wizard.getStep() == null || tab.getId().equals(wizard.getStep()))) {
          renderChildren(facesContext, tab);
         
          break;
        }
      }
View Full Code Here

        String defaultStep = null;
        for (Iterator<UIComponent> children = wizard.getChildren().iterator(); children.hasNext();) {
            UIComponent child = children.next();

            if (child instanceof Tab && child.isRendered()) {
                Tab tab = (Tab) child;
                if (defaultStep == null) {
                    defaultStep = tab.getId();
                }

                if (!firstStep) {
                    writer.write(",");
                } else {
                    firstStep = false;
                }

                writer.write("'" + tab.getId() + "'");
            }
        }
        writer.write("]");

        //current step
View Full Code Here

    }

    protected void encodeCurrentStep(FacesContext facesContext, Wizard wizard) throws IOException {
        for (UIComponent child : wizard.getChildren()) {
            if (child instanceof Tab && child.isRendered()) {
                Tab tab = (Tab) child;

                if ((wizard.getStep() == null || tab.getId().equals(wizard.getStep()))) {
                    tab.encodeAll(facesContext);

                    break;
                }
            }
        }
View Full Code Here

        writer.startElement("ul", null);
        writer.writeAttribute("class", "ui-wizard-step-titles ui-helper-reset ui-helper-clearfix", null);

        for(UIComponent child : wizard.getChildren()) {
            if(child instanceof Tab && child.isRendered()) {
                Tab tab = (Tab) child;
                String styleClass = "ui-wizard-step-title ui-state-default";

                if((!currentFound) && (currentStep == null || tab.getId().equals(currentStep))) {
                    styleClass += " ui-state-hover";
                    currentFound = true;
                }

                styleClass += " ui-corner-all";

                writer.startElement("li", null);
                writer.writeAttribute("class", styleClass, null);
                if(tab.getTitletip() != null)
                    writer.writeAttribute("title", tab.getTitletip(), null);
               
                writer.write(tab.getTitle());
                writer.endElement("li");
            }
        }

        writer.endElement("ul");
View Full Code Here

            }
        }
        else {
            int dataCount = tabView.getRowCount();
            activeIndex = activeIndex >= dataCount ? 0 : activeIndex;
            Tab tab = (Tab) tabView.getChildren().get(0);
           
            for(int i = 0; i < dataCount; i++) {
                tabView.setIndex(i);
                encodeTabHeader(context, tabView, tab, (i == activeIndex));
            }
View Full Code Here

            }
        }
        else {
            int dataCount = tabView.getRowCount();
            activeIndex = activeIndex >= dataCount ? 0 : activeIndex;
            Tab tab = (Tab) tabView.getChildren().get(0);
           
            for(int i = 0; i < dataCount; i++) {
                tabView.setIndex(i);
                encodeTabContent(context, tab, (i == activeIndex), dynamic);
            }
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.