javax.faces.webapp.UIComponentClassicTagBase.removeFormerChildren()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(69)

本文整理了Java中javax.faces.webapp.UIComponentClassicTagBase.removeFormerChildren()方法的一些代码示例,展示了UIComponentClassicTagBase.removeFormerChildren()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIComponentClassicTagBase.removeFormerChildren()方法的具体详情如下:
包路径:javax.faces.webapp.UIComponentClassicTagBase
类名称:UIComponentClassicTagBase
方法名:removeFormerChildren

UIComponentClassicTagBase.removeFormerChildren介绍

[英]Remove any child components of the associated components which do not have corresponding tags as children of this tag. This only happens when a view is being re-rendered and there are components in the view tree which don't have corresponding JSP tags. Wrapping JSF tags in JSTL "c:if" statements is one way this can happen.
Attention: programmatically added components are are not affected by this: they will not be on the old list of created components nor on the new list of created components, so nothing will happen to them.
[中]删除关联组件的所有子组件,这些组件没有相应的标记作为此标记的子组件。只有当视图被重新呈现,并且视图树中的组件没有相应的JSP标记时,才会发生这种情况。在JSTL“c:if”语句中包装JSF标记是实现这一点的一种方法。
注意:以编程方式添加的组件不受此影响:它们既不在旧的已创建组件列表中,也不在新的已创建组件列表中,因此不会发生任何事情。

代码示例

代码示例来源:origin: org.apache.myfaces.core/myfaces-api

UIComponent component = getComponentInstance();
removeFormerChildren(component);
removeFormerFacets(component);

代码示例来源:origin: org.apache.myfaces/com.springsource.org.apache.myfaces.javax.faces

UIComponent component = getComponentInstance();
removeFormerChildren(component);
removeFormerFacets(component);

相关文章

微信公众号

最新文章

更多

UIComponentClassicTagBase类方法