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

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

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

UIComponentClassicTagBase.createComponent介绍

[英]Create and return a new child component of the type returned by calling getComponentType(). If this UIComponentTag has a non-null binding attribute, this is done by call Application#createComponent with the expression created for the binding attribute, and the expression will be stored on the component. Otherwise, Application#createComponent is called with only the component type. Finally, initialize the components id and other properties.
[中]创建并返回通过调用getComponentType()返回的类型的新子组件。如果此UIComponentTag具有非nullbinding属性,则可通过调用应用程序#createComponent使用为binding属性创建的表达式来完成,表达式将存储在组件上。否则,只使用组件类型调用应用程序#createComponent。最后,初始化组件id和其他属性。

代码示例

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a facet.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} of the new facet
 * @param name Name of the new facet
 * @param newId id of the new facet
 */
private UIComponent createFacet(FacesContext context, UIComponent parent,
                String name, String newId) throws JspException {
  UIComponent component = createComponent(context, newId);
  parent.getFacets().put(name, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(
    FacesContext context,
    UIComponent parent,
    UIComponentClassicTagBase parentTag,
    String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

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

/**
 * <p>Create a new child component using <code>createComponent</code>,
 * initialize its properties, and add it to its parent as a child.
 * </p>
 * @param context {@link FacesContext} for the current request
 * @param parent Parent {@link UIComponent} for the new child
 * @param componentId Component identifier for the new child,
 *  or <code>null</code> for no explicit identifier
 */
private UIComponent createChild(FacesContext context, UIComponent parent,
                String componentId) throws JspException {
  UIComponent component = createComponent(context, componentId);
  UIComponentTagBase parentTag = getParentUIComponentClassicTagBase(pageContext);
  int indexOfNextChildTag = parentTag.getIndexOfNextChildTag();
  if (indexOfNextChildTag > parent.getChildCount()) {
    indexOfNextChildTag = parent.getChildCount();
  }
  parent.getChildren().add(indexOfNextChildTag, component);
  created = true;
  return (component);
}

相关文章

微信公众号

最新文章

更多

UIComponentClassicTagBase类方法