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

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

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

UIComponentClassicTagBase.addChild介绍

暂无

代码示例

代码示例来源:origin: com.sun.faces/jsf-api

/**
 * <p>Add <i>verbatim</i> as a sibling of <i>component</i> in
 * <i>component</i> in the parent's child list.  <i>verbatim</i> is
 * added to the list at the position immediatly following
 * <i>component</i>.</p>
 */
protected void addVerbatimAfterComponent(UIComponentClassicTagBase parentTag,
                     UIComponent verbatim,
                     UIComponent component) {
  int indexOfComponentInParent;
  UIComponent parent = component.getParent();
  // invert the order of this if and the assignment below.  Since this line is
  // here, it appears an early return is acceptable/desired if parent is null,
  // and, if it is null, we should probably check for that before we try to
  // access it.  2006-03-15 jdl
  if (null == parent) {
    return;
  }
  List<UIComponent> children = parent.getChildren();
  indexOfComponentInParent = children.indexOf(component);
  if (children.size() - 1 == indexOfComponentInParent) {
    children.add(verbatim);
  }
  else {
    children.add(indexOfComponentInParent + 1, verbatim);
  }
  parentTag.addChild(verbatim);
}

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

parentTag.addChild(verbatim);

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

/**
 * <p>Add <i>verbatim</i> as a sibling of <i>component</i> in
 * <i>component</i> in the parent's child list.  <i>verbatim</i> is
 * added to the list at the position immediatly following
 * <i>component</i>.</p>
 */
protected void addVerbatimAfterComponent(UIComponentClassicTagBase parentTag,
          UIComponent verbatim,
          UIComponent component) {
int indexOfComponentInParent;
UIComponent parent = component.getParent();
// invert the order of this if and the assignment below.  Since this line is
// here, it appears an early return is acceptable/desired if parent is null,
// and, if it is null, we should probably check for that before we try to
// access it.  2006-03-15 jdl
if (null == parent) {
  return;
}
List<UIComponent> children = parent.getChildren();
indexOfComponentInParent = children.indexOf(component);
if (children.size() - 1 == indexOfComponentInParent) {
  children.add(verbatim);
}
else {
  children.add(indexOfComponentInParent + 1, verbatim);
}
parentTag.addChild(verbatim);
}

代码示例来源:origin: org.glassfish/jakarta.faces

children.add(indexOfComponentInParent + 1, verbatim);
parentTag.addChild(verbatim);

代码示例来源:origin: org.jboss.spec.javax.faces/jboss-jsf-api_2.0_spec

/**
 * <p>Add <i>verbatim</i> as a sibling of <i>component</i> in
 * <i>component</i> in the parent's child list.  <i>verbatim</i> is
 * added to the list at the position immediatly following
 * <i>component</i>.</p>
 */
protected void addVerbatimAfterComponent(UIComponentClassicTagBase parentTag,
                     UIComponent verbatim,
                     UIComponent component) {
  int indexOfComponentInParent;
  UIComponent parent = component.getParent();
  // invert the order of this if and the assignment below.  Since this line is
  // here, it appears an early return is acceptable/desired if parent is null,
  // and, if it is null, we should probably check for that before we try to
  // access it.  2006-03-15 jdl
  if (null == parent) {
    return;
  }
  List<UIComponent> children = parent.getChildren();
  indexOfComponentInParent = children.indexOf(component);
  if (children.size() - 1 == indexOfComponentInParent) {
    children.add(verbatim);
  }
  else {
    children.add(indexOfComponentInParent + 1, verbatim);
  }
  parentTag.addChild(verbatim);
}

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

parentTag.addChild(verbatim);

代码示例来源:origin: javax/javaee-web-api

children.add(indexOfComponentInParent + 1, verbatim);
parentTag.addChild(verbatim);

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

parentTag.addChild(verbatimComp);

代码示例来源:origin: javax/javaee-web-api

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: javax.faces/javax.faces-api

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: org.glassfish/javax.faces

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: jboss/jboss-javaee-specs

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: com.sun.faces/jsf-api

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: org.glassfish/jakarta.faces

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

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

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);        
}

代码示例来源:origin: org.jboss.spec.javax.faces/jboss-jsf-api_2.0_spec

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: eclipse-ee4j/mojarra

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

代码示例来源:origin: eclipse-ee4j/mojarra

void addChildToComponentAndTag(UIComponent child) {
  UIComponent myComponent = this.getComponentInstance();
  int indexOfNextChildTag = this.getIndexOfNextChildTag();
  if (indexOfNextChildTag > myComponent.getChildCount()) {
    indexOfNextChildTag = myComponent.getChildCount();
  }
  myComponent.getChildren().add(indexOfNextChildTag, child);
  this.addChild(child);
}

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

parentTag.addChild(verbatimComp);

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

parentTag.addChild(verbatimComp);

相关文章

微信公众号

最新文章

更多

UIComponentClassicTagBase类方法