empire-db-jakarta-faces/src/main/java/org/apache/empire/jakarta/components/TabViewTag.java [411:465]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void encodeTabLink(FacesContext context, ResponseWriter writer, int index, TabPageTag pageTag, boolean disabled, String showTabBlindJs)
        throws IOException
    {
        // Add component
        HtmlCommandLink link = null;
        List<UIComponent> tabLinks = getChildren();
        if (tabLinks.size() > index)
        {
            UIComponent c = tabLinks.get(index);
            if (c instanceof HtmlCommandLink)
            {
                link = (HtmlCommandLink) c;
            }
            else
            { // Something's wrong here?
                log.error("INFO: Unexpected child node for {}! Child item type is {}.", getClass().getName(), c.getClass().getName());
                // encode anyway
                c.setRendered(true);
                c.encodeAll(context);
                c.setRendered(false); // Don't render twice!
                return;
            }
        }
        if (link == null)
        { // create the tab-Link   
            String linkId = TABLINK_ID_PREFIX + String.valueOf(index);
            link = createTabCommandLink(context, pageTag, linkId);
            tabLinks.add(index, link);
            // Set StyleClass
            String styleClass = StringUtils.coalesce(link.getStyleClass(), TagStyleClass.TAB_LINK.get());
            String extraClass = pageTag.helper.getTagAttributeString("labelClass");
            if (StringUtils.isNotEmpty(extraClass))
                styleClass = StringUtils.concat(styleClass, " ", extraClass);
            link.setStyleClass(styleClass);
            // showTabBlindJs
            if (showTabBlindJs!=null)
            {   // append showTabBlindJs
                String onClick = link.getOnclick();
                onClick = StringUtils.concat(onClick, showTabBlindJs);
                link.setOnclick(onClick);
            }
            // Set TabPageActionListener
            TabPageActionListener tpal = new TabPageActionListener(this);
            link.addActionListener(tpal);
        }
        // init linkComponent
        link.setValue(pageTag.getTabLabel());
        link.setTitle(pageTag.getTabTitle());
        link.setDisabled(disabled);
            
        // encode link
        link.setRendered(true);
        encodeTabCommandLink(context, pageTag, link);
        link.setRendered(false); // Don't render twice!
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/TabViewTag.java [411:465]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void encodeTabLink(FacesContext context, ResponseWriter writer, int index, TabPageTag pageTag, boolean disabled, String showTabBlindJs)
        throws IOException
    {
        // Add component
        HtmlCommandLink link = null;
        List<UIComponent> tabLinks = getChildren();
        if (tabLinks.size() > index)
        {
            UIComponent c = tabLinks.get(index);
            if (c instanceof HtmlCommandLink)
            {
                link = (HtmlCommandLink) c;
            }
            else
            { // Something's wrong here?
                log.error("INFO: Unexpected child node for {}! Child item type is {}.", getClass().getName(), c.getClass().getName());
                // encode anyway
                c.setRendered(true);
                c.encodeAll(context);
                c.setRendered(false); // Don't render twice!
                return;
            }
        }
        if (link == null)
        { // create the tab-Link   
            String linkId = TABLINK_ID_PREFIX + String.valueOf(index);
            link = createTabCommandLink(context, pageTag, linkId);
            tabLinks.add(index, link);
            // Set StyleClass
            String styleClass = StringUtils.coalesce(link.getStyleClass(), TagStyleClass.TAB_LINK.get());
            String extraClass = pageTag.helper.getTagAttributeString("labelClass");
            if (StringUtils.isNotEmpty(extraClass))
                styleClass = StringUtils.concat(styleClass, " ", extraClass);
            link.setStyleClass(styleClass);
            // showTabBlindJs
            if (showTabBlindJs!=null)
            {   // append showTabBlindJs
                String onClick = link.getOnclick();
                onClick = StringUtils.concat(onClick, showTabBlindJs);
                link.setOnclick(onClick);
            }
            // Set TabPageActionListener
            TabPageActionListener tpal = new TabPageActionListener(this);
            link.addActionListener(tpal);
        }
        // init linkComponent
        link.setValue(pageTag.getTabLabel());
        link.setTitle(pageTag.getTabTitle());
        link.setDisabled(disabled);
            
        // encode link
        link.setRendered(true);
        encodeTabCommandLink(context, pageTag, link);
        link.setRendered(false); // Don't render twice!
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



