当前位置: 首页>>代码示例>>Java>>正文


Java TypedUtil.getChildren方法代码示例

本文整理汇总了Java中com.ibm.xsp.util.TypedUtil.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java TypedUtil.getChildren方法的具体用法?Java TypedUtil.getChildren怎么用?Java TypedUtil.getChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ibm.xsp.util.TypedUtil的用法示例。


在下文中一共展示了TypedUtil.getChildren方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getExtraFacet

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public UIComponent getExtraFacet(AbstractDataView dataView, int index){
    // the "extra" facets are row facets [see AbstractDataView.getRowFacetNames()]
    List<UIComponent> children = TypedUtil.getChildren(dataView);
    if( children.isEmpty() ){
        // Note, children will only be empty in JUnit tests 
        // where UIDataView.buildContents is not called.
        return null;
    }
    UIComponent row = children.get(0);
    if(index==0) {
        UIComponent c = row.getFacet(UIDataView.FACET_EXTRA_N);
        if(c!=null) {
            return c;
        }
    }
    return row.getFacet(UIDataView.FACET_EXTRA_N+index);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:DataViewRenderer.java

示例2: removeChildren

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public static void removeChildren(UIComponent component) {
	_logger.finer("start removeChildren");
	try {
		List<UIComponent> children = TypedUtil.getChildren(component);
		if (children.size() > 0) {
			_logger.finer("removChildren " + component.getId() + " has " + component.getChildCount() + " children");
			int counter = 0;
			for (UIComponent child : children) {
				counter++;
				_logger.finer("processing child #" + counter + " of " + component.getId());
				_logger.finer(child.getId() + " has " + child.getChildCount() + " children, calling removeChildren");
				removeChildren(child);
			}
			_logger.finer("out of loop for " + component.getId() + " processed " + counter + " components");
			removeComponent(component);
		} else {
			_logger.finer("removing childless component " + component.getId() + " whose parent is "
					+ component.getParent().getId());
			component.setRendered(false);
			removeComponent(component);
		}
		_logger.finer("finish removeChildren");
	} catch (Exception e) {
		_logger.log(Level.WARNING, "Unhandled Exception", e);
	}
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:27,代码来源:ComponentTreeMassage.java

示例3: writeOneColumnRows

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@Override
protected void writeOneColumnRows(FacesContext context, ResponseWriter w, FormLayout c, UIComponent parent, ComputedFormData formData) throws IOException {
    List<UIComponent> children = TypedUtil.getChildren(parent);
    for(UIComponent child: children) {
        if(!child.isRendered()) {
            continue;
        }
        if(child instanceof UIFormLayoutRow) {
            newLine(w);
            writeFormRow(context, w, c, formData, (UIFormLayoutRow)child);
        } else {
            if( !(child instanceof FormLayout) ){
                writeChildRows(context, w, c, child, formData);
            }// do not recurse through FormLayout descendants
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:MobileFormTableRenderer.java

示例4: delayedRemoveChildren

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private void delayedRemoveChildren() {
    if( this.getChildCount() > 0 ){
        List<UIComponent> kids = TypedUtil.getChildren(this);
        // give the child an opportunity to remove itself from the children list.
        // note getChildCount will be changing.
        for (int i = 0; i < this.getChildCount(); i++) {
            UIComponent child = kids.get(i);
            if(child instanceof UIDojoTabPane){
                UIDojoTabPane pane = (UIDojoTabPane) child;
                if( pane.isDelayedRemoveTab() ){
                    pane.delayedRemove();
                    if( (i < this.getChildCount()) && pane != kids.get(i) ){
                        i--;
                    }
                }
            }// else probably xp:eventHandler
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:UIDojoTabContainer.java

示例5: removeChildren

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public static void removeChildren(final UIComponent component) {
	_logger.finer("start removeChildren");
	try {
		List<UIComponent> children = TypedUtil.getChildren(component);
		if (children.size() > 0) {
			_logger.finer("removChildren " + component.getId() + " has " + component.getChildCount() + " children");
			int counter = 0;
			for (UIComponent child : children) {
				counter++;
				_logger.finer("processing child #" + counter + " of " + component.getId());
				_logger.finer(child.getId() + " has " + child.getChildCount() + " children, calling removeChildren");
				removeChildren(child);
			}
			_logger.finer("out of loop for " + component.getId() + " processed " + counter + " components");
			removeComponent(component);
		} else {
			_logger.finer("removing childless component " + component.getId() + " whose parent is " + component.getParent().getId());
			component.setRendered(false);
			removeComponent(component);
		}
		_logger.finer("finish removeChildren");
	} catch (Exception e) {
		_logger.log(Level.WARNING, "Unhandled Exception", e);
	}
}
 
开发者ID:jesse-gallagher,项目名称:XPages-Scaffolding,代码行数:26,代码来源:ComponentTreeMassage.java

示例6: initViewDefinition

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
protected void initViewDefinition(FacesContext context, AbstractDataView dataView, ViewDefinition viewDef) {
    List<UIComponent> children = TypedUtil.getChildren(dataView); 
    viewDef.dataView = dataView;
    viewDef.dataModel = dataView.getDataModel();
    viewDef.showItemsFlat = dataView.isShowItemsFlat(); 
    viewDef.detailsOnClient = dataView.isDetailsOnClient() || (Boolean)getProperty(PROP_SHOWHIDEONCLIENT);
    viewDef.collapsibleDetails = dataView.isCollapsibleDetail();
    viewDef.expandedDetailDefault = dataView.isExpandedDetail();
    
    if(viewDef.collapsibleDetails) {
        viewDef.showHideDetailFunctionName = ExtLibUtil.encodeJSFunctionName(dataView.getClientId(context));
    }
    viewDef.summaryColumn = dataView.getSummaryColumn();
    if(!children.isEmpty()) {
        UIComponent row = children.get(0);
        viewDef.summaryFacet = row.getFacet(AbstractDataView.FACET_SUMMARY); // row facet
        viewDef.detailFacet = row.getFacet(AbstractDataView.FACET_DETAIL);// row facet
    }
    viewDef.hasSummary = viewDef.summaryColumn!=null || viewDef.summaryFacet!=null;  
    viewDef.hasDetail = viewDef.detailFacet!=null;
    viewDef.nColumns =   (viewDef.hasCheckBoxColumn?1:0) // CheckBox
                       + 1 // Data - always
                       + (viewDef.collapsibleDetails?1:0); // Collapsible details
    viewDef.viewRowRefresh = dataView.isRowRefresh(context);
    viewDef.rows = dataView.getRows();
    
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:28,代码来源:AbstractDataViewRenderer.java

示例7: findTypeAheadChild

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private XspTypeAhead findTypeAheadChild(UIComponent component) {
    if(component.getChildCount()>0) {
        for (UIComponent child : TypedUtil.getChildren(component)) {
            if( child instanceof XspTypeAhead ){
                return (XspTypeAhead) child;
            }
        }
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:MobileTypeAheadInputRenderer.java

示例8: isEmptyChildren

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
protected boolean isEmptyChildren(UIComponent c) {
    if(c.getChildCount()>0) {
        // We should check the children one by one...
        for(UIComponent child: TypedUtil.getChildren(c)) {
            if(!isEmptyComponent(child)) {
                return false;
            }
        }
    }
    // No children, so the list is empty
    return true;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:AbstractApplicationLayoutRenderer.java

示例9: moveToLast

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public static void moveToLast(UIComponent component) {
	List<UIComponent> siblings = TypedUtil.getChildren(component.getParent());
	if (!siblings.isEmpty()) {
		int movedCompIndex = siblings.indexOf(component);
		UIComponent movedComp = siblings.remove(movedCompIndex);
		siblings.add(movedComp);
	}
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:9,代码来源:ComponentTreeMassage.java

示例10: findEdit

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private UIInput findEdit(UIComponent parent) {
    for(UIComponent c: TypedUtil.getChildren(parent)) {
        if(c instanceof UIInput) {
            return (UIInput)c;
        }
        if(c.getChildCount()>0) {
            UIInput e = findEdit(c);
            if(e!=null) {
                return e;
            }
        }
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:15,代码来源:UIFormLayoutRow.java

示例11: moveToLocation

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public static void moveToLocation(UIComponent component, Integer location) {
	List<UIComponent> siblings = TypedUtil.getChildren(component.getParent());
	if (!siblings.isEmpty()) {
		int movedCompIndex = siblings.indexOf(component);
		UIComponent movedComp = siblings.remove(movedCompIndex);
		siblings.add(location, movedComp);
	}
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:9,代码来源:ComponentTreeMassage.java

示例12: getPopupContent

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public UIMobilePageContent getPopupContent() {
    List<UIComponent> children = TypedUtil.getChildren(this);
    if(!children.isEmpty()) {
        return (UIMobilePageContent)children.get(0);
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:8,代码来源:UIMobilePage.java

示例13: deleteChildEventHandlers

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private void deleteChildEventHandlers(FacesContext context) {
    List<UIComponent> children = TypedUtil.getChildren(this);
    for (int i = 0; i < children.size(); i++) {
        UIComponent child = children.get(i);
        if( child instanceof UIEventHandler ){
            children.remove(i);
            i--;
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:UIMobilePageContent.java

示例14: moveToAfter

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public static void moveToAfter(UIComponent component, UIComponent afterComp) {
	List<UIComponent> afterCompSiblings = TypedUtil.getChildren(afterComp.getParent());
	List<UIComponent> compSiblings = TypedUtil.getChildren(component.getParent());
	if (!afterCompSiblings.isEmpty()) {
		int movedCompIndex = compSiblings.indexOf(component);
		UIComponent movedComp = compSiblings.remove(movedCompIndex);
		int afterCompIndex = afterCompSiblings.indexOf(afterComp) + 1;
		afterCompSiblings.add(afterCompIndex, movedComp);
	}
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:11,代码来源:ComponentTreeMassage.java

示例15: isEmptyChildren

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
protected boolean isEmptyChildren(UIComponent c) {
    if (c.getChildCount() > 0) {
        // We should check the children one by one...
        for (UIComponent child : TypedUtil.getChildren(c)) {
            if (!isEmptyComponent(child)) {
                return false;
            }
        }
    }
    // No children, so the list is empty
    return true;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:SimpleResponsiveLayoutRenderer.java


注:本文中的com.ibm.xsp.util.TypedUtil.getChildren方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。