Package org.richfaces.bootstrap.ui.tab

Examples of org.richfaces.bootstrap.ui.tab.AbstractTab


    }
   
    private boolean hasDefaultChild(List<UIComponent> children, boolean hasDefaultChildSoFar) {
        for(UIComponent child : children) {
            if(child instanceof AbstractTab) {
                AbstractTab tab = (AbstractTab) child;
               
                // If we already find a child so far, we need to disable any other tab#isDefault()
                if(hasDefaultChildSoFar) {
                    tab.getAttributes().put(AbstractTab.DEFAULT_ATTRIBUTE_NAME, false);
                }
                // If not, we can take the value of the current tab
                else {
                    hasDefaultChildSoFar = tab.isDefault();
                }
               
            } else if(child instanceof AbstractMenuFacet) {
                boolean hasDefaultChildSoFarOld = hasDefaultChildSoFar;
                hasDefaultChildSoFar = hasDefaultChild(child.getChildren(), hasDefaultChildSoFar);
View Full Code Here


    }
   
    private boolean setDefaultChildByName(List<UIComponent> children, String tabName, boolean hasDefaultChildSoFar) {
        for(UIComponent child : children) {
            if(child instanceof AbstractTab) {
                AbstractTab tab = (AbstractTab) child;
               
                // If we didn't found a corresponding name so far and the current one match,
                // then it's the default one!
                if(!hasDefaultChildSoFar && tabName.equals(tab.getName())) {
                    tab.getAttributes().put(AbstractTab.DEFAULT_ATTRIBUTE_NAME, true);
                    hasDefaultChildSoFar = true;
                }
               
            } else if(child instanceof AbstractMenuFacet) {
                boolean hasDefaultChildSoFarOld = hasDefaultChildSoFar;
View Full Code Here

            } else {
                localIndex = ""+intLocalIndex;
            }
           
            if(child instanceof AbstractTab && localIndex.equals(index)) {
                AbstractTab tab = (AbstractTab) child;
                tab.getAttributes().put(AbstractTab.DEFAULT_ATTRIBUTE_NAME, true);
                hasDefaultChildSoFar = true;
               
            } else if(child instanceof AbstractMenuFacet) {
                boolean hasDefaultChildSoFarOld = hasDefaultChildSoFar;
                hasDefaultChildSoFar = setDefaultChildByIndex(child.getChildren(), index, localIndex, hasDefaultChildSoFar);
View Full Code Here

TOP

Related Classes of org.richfaces.bootstrap.ui.tab.AbstractTab

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.