TAB切换
@param tabParentId  tab的父节点ID或者对象本身
338465
function switchTab( tabParentId ) {
    var tabElements = $G( tabParentId ).children,
        tabHeads = tabElements[0].children,
        tabBodys = tabElements[1].children;

    for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
        var head = tabHeads[i];
        if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
        head.onclick = function () {
            clickHandler(tabHeads,tabBodys,this);
        }
    }
}
10849
public final boolean isParentItem(int adapterPosition) {
        int itemCount = 0;

        int parentCount = parentItemCount();
        for (int i = 0; i < parentCount; i++) {
            if (itemCount == adapterPosition) {
                return true;
            }

            itemCount += 1;

            if (isExpanded(i)) {
                itemCount += childItemCount(i);
            } else {
                // itemCount += 1;
            }
        }

        return false;
    }
404963
func (s *ListAccountsForParentInput) SetParentId(v string) *ListAccountsForParentInput {
	s.ParentId = &v
	return s
}
598329
@Override
    public void selectTab(final int index) {
        if (index < PAGE_LIMIT) {
            // visible pages
            flagSelected(prevSelectedIndex, false);
            super.selectTab(index);
            flagSelected(index, true);
            prevSelectedIndex = index;

            if (index == PAGE_LIMIT - 1 && offPageContainer.getSelectedDeck() == -1) {
                offPageContainer.selectDeck(0);
            }

        } else {
            // off page
            offPageContainer.selectDeck(offPageIndex(index));
            if (getSelectedIndex() == PAGE_LIMIT - 1) {
                SelectionEvent.fire(this, PAGE_LIMIT - 1);
            }
            tabs.lastTab().setText(offPageContainer.getTexts().get(offPageIndex(index)).getText());
            selectTab(PAGE_LIMIT - 1);
        }
    }
552944
@Override
    public Node getParentNode(String parentNodeId)
    {
        NodeLink link = new NodeLink(parentNodeId, getNodeId());

        if (this.parents == null)
        {
            return null;
        }
        else
        {
            return this.parents.get(link);
        }
    }
728594
def add_parent(self, id, pid, relation='subClassOf'):
        
        g = self.get_graph()
        g.add_edge(pid, id, pred=relation)
1223171
function(attr) {
            TabView.superclass.initAttributes.call(this, attr);
            
            if (!attr.orientation) {
                attr.orientation = 'top';
            }
            
            var el = this.get(ELEMENT);

            if (!Dom.hasClass(el, this.CLASSNAME)) {
                Dom.addClass(el, this.CLASSNAME);        
            }
            
            /**
             * The Tabs belonging to the TabView instance.
             * @attribute tabs
             * @type Array
             */
            this.setAttributeConfig('tabs', {
                value: [],
                readOnly: true
            });

            /**
             * The container of the tabView's label elements.
             * @property _tabParent
             * @private
             * @type HTMLElement
             */
            this._tabParent = 
                    this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,
                            'ul' )[0] || this._createTabParent();
                
            /**
             * The container of the tabView's content elements.
             * @property _contentParent
             * @type HTMLElement
             * @private
             */
            this._contentParent = 
                    this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,
                            'div')[0] ||  this._createContentParent();
            
            /**
             * How the Tabs should be oriented relative to the TabView.
             * @attribute orientation
             * @type String
             * @default "top"
             */
            this.setAttributeConfig('orientation', {
                value: attr.orientation,
                method: function(value) {
                    var current = this.get('orientation');
                    this.addClass('yui-navset-' + value);
                    
                    if (current != value) {
                        this.removeClass('yui-navset-' + current);
                    }
                    
                    if (value === 'bottom') {
                        this.appendChild(this._tabParent);
                    }
                }
            });
            
            /**
             * The index of the tab currently active.
             * @attribute activeIndex
             * @type Int
             */
            this.setAttributeConfig(ACTIVE_INDEX, {
                value: attr.activeIndex,
                validator: function(value) {
                    var ret = true;
                    if (value && this.getTab(value).get('disabled')) { // cannot activate if disabled
                        ret = false;
                    }
                    return ret;
                }
            });
            
            /**
             * The tab currently active.
             * @attribute activeTab
             * @type YAHOO.widget.Tab
             */
            this.setAttributeConfig(ACTIVE_TAB, {
                value: attr.activeTab,
                method: function(tab) {
                    var activeTab = this.get(ACTIVE_TAB);
                    
                    if (tab) {
                        tab.set(ACTIVE, true);
                    }
                    
                    if (activeTab && activeTab !== tab) {
                        activeTab.set(ACTIVE, false);
                    }
                    
                    if (activeTab && tab !== activeTab) { // no transition if only 1
                        this.contentTransition(tab, activeTab);
                    } else if (tab) {
                        tab.set('contentVisible', true);
                    }
                },
                validator: function(value) {
                    var ret = true;
                    if (value && value.get('disabled')) { // cannot activate if disabled
                        ret = false;
                    }
                    return ret;
                }
            });

            this.on('activeTabChange', this._onActiveTabChange);
            this.on('activeIndexChange', this._onActiveIndexChange);

            if ( this._tabParent ) {
                this._initTabs();
            }
            
            // Due to delegation we add all DOM_EVENTS to the TabView container
            // but IE will leak when unsupported events are added, so remove these
            this.DOM_EVENTS.submit = false;
            this.DOM_EVENTS.focus = false;
            this.DOM_EVENTS.blur = false;

            for (var type in this.DOM_EVENTS) {
                if ( YAHOO.lang.hasOwnProperty(this.DOM_EVENTS, type) ) {
                    this.addListener.call(this, type, this.DOMEventHandler);
                }
            }
        }
590995
private void setIdsAndAttribs(
            Element parent, String labelBase, String index, String precedence) {
        NodeList children = parent.getChildNodes();

        for (int i = 0; i < children.getLength(); i++) {
            if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
                Element child = (Element) children.item(i);
                String id = child.getAttribute(Constants.ATT_ID);
                if (!id.equals("")) {
                    String newId = labelBase + id;
                    child.setAttribute(Constants.ATT_ID, newId);
                    child.setIdAttribute(Constants.ATT_ID, true);
                    child.setAttributeNS(Constants.NS_URI, Constants.ATT_FRAGMENT, index);
                    child.setAttributeNS(Constants.NS_URI, Constants.ATT_PRECEDENCE, precedence);
                    setIdsAndAttribs(child, labelBase, index, precedence);
                }
            }
        }
    }
905962
public QueryBuilder addParentIds(final Collection<Integer> ids) {
        if (ids != null) {
            parentIds.addAll(ids);
        }
        return this;
    }
129720
protected Attribute copy(final long _parentId)
    {
        final Attribute ret = new Attribute(getId(), _parentId, getName(), this.sqlTable, this.attributeType,
                        this.defaultValue, this.dimensionUUID, this.required, this.size, this.scale);
        ret.getSqlColNames().addAll(getSqlColNames());
        ret.setLink(this.link);
        ret.setClassName(getClassName());
        ret.getProperties().putAll(getProperties());
        return ret;
    }
375837
@Override
    public void selectTab(String tabbedPaneComponentName, int tabIndex) throws QTasteException {
        LOGGER.trace("selectTab(\"" + tabbedPaneComponentName + "\", " + tabIndex + ")");
        new TabSelector(TabSelector.SelectorIdentifier.SELECT_BY_INDEX).executeCommand(COMPONENT_ENABLED_TIMEOUT,
              tabbedPaneComponentName, tabIndex);
    }
482416
public void renderEntityForm(String entityId, List<CmsTabInfo> tabInfos, Panel context, Element scrollParent) {

        CmsEntity entity = m_entityBackend.getEntity(entityId);
        if (entity != null) {
            boolean initUndo = (m_entity == null) || !entity.getId().equals(m_entity.getId());
            m_entity = entity;
            CmsType type = m_entityBackend.getType(m_entity.getTypeName());
            m_formPanel = new FlowPanel();
            context.add(m_formPanel);
            CmsAttributeHandler.setScrollElement(scrollParent);
            CmsButtonBarHandler.INSTANCE.setWidgetService(m_widgetService);
            if (m_rootHandler == null) {
                m_rootHandler = new CmsRootHandler();
            } else {
                m_rootHandler.clearHandlers();
            }
            m_tabInfos = tabInfos;
            m_formTabs = m_widgetService.getRendererForType(
                type).renderForm(m_entity, m_tabInfos, m_formPanel, m_rootHandler, 0);
            m_validationHandler.registerEntity(m_entity);
            m_validationHandler.setRootHandler(m_rootHandler);
            m_validationHandler.setFormTabPanel(m_formTabs);
            if (initUndo) {
                CmsUndoRedoHandler.getInstance().initialize(m_entity, this, m_rootHandler);
            }
            // trigger validation right away
            m_validationHandler.validate(m_entity);
        }
    }
611678
public void deleteChildren(final long parentId) throws SQLException {
      Connection conn = null;
      PreparedStatement stmt = null;
      Timer.Context ctx = metrics.deleteChildrenTimer.time();
      try {
         conn = connectionSupplier.getConnection();
         stmt = conn.prepareStatement(deleteChildrenSQL);
         stmt.setLong(1, parentId);
         stmt.executeUpdate();
      } finally {
         ctx.stop();
         SQLUtil.closeQuietly(conn, stmt);
      }
   }
1071189
public function getParentIds($rootId = 0)
    {
        if ($this->_parentIds === null) {
            // 增加对模型内置[[getAll()]]方法的支持，可避免多次查询数据库，优化性能
            if ($this->owner->hasMethod('getAll')) {
                $this->_parentIds = $this->getParentIdsInternal($rootId);
            } else {
                $this->_parentIds = Tree::getParentIds($this->owner, 0, $this->pkField, $this->parentField, $rootId);
            }
        }
        
        return $this->_parentIds;
    }
929332
public A_CmsTab getTab(GalleryTabId tabId) {

        for (A_CmsTab tab : m_tabbedPanel) {
            if (tabId == GalleryTabId.valueOf(tab.getTabId())) {
                return tab;
            }
        }
        return null;
    }
1161908
@Override
    public final void visitParent(Element element) {
        if (isWriting()){
            depth--;
            newlineAndIndent();
            endTag(element.getName()); // </elementName>
        }
    }
1303214
@Override
    public void selectTab(final String text) {
        for (int i = 0; i < tabs.size(); i++) {
            if (text.equals(tabs.get(i).getText())) {
                selectTab(i);
                return;
            }
        }

        // not found in visible tabs, should be in off-page
        for (OffPageText opt : offPageContainer.getTexts()) {
            if (text.equals(opt.getText())) {
                if (opt.getIndex() == 0) {
                    // the first off-page needs special treatment
                    offPageContainer.selectDeck(opt.getIndex());
                    if (getSelectedIndex() == PAGE_LIMIT - 1) {
                        SelectionEvent.fire(this, PAGE_LIMIT - 1);
                    }
                    tabs.lastTab().setText(opt.getText());
                    selectTab(PAGE_LIMIT - 1);
                } else {
                    selectTab(PAGE_LIMIT - 1 + opt.getIndex());
                }
            }
        }
    }