Java UIComponent.getCompositeComponentParent方法代码示例

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


Java UIComponent.getCompositeComponentParent方法代码示例

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

示例1: _isCompositeParentCurrent

import javax.faces.component.UIComponent; //导入方法依赖的package包/类
private boolean _isCompositeParentCurrent(FacesContext context, UIComponent component)
{
  UIComponent currentCompositeComponent = UIComponent.getCurrentCompositeComponent(context);
  if(UIComponent.isCompositeComponent(component))
  {
    return component.equals(currentCompositeComponent);
  }
  else
  {
    UIComponent compositeParent = UIComponent.getCompositeComponentParent(component);
    if(compositeParent == null)
    {
      return currentCompositeComponent == null;
    }
    else
    {
      return compositeParent.equals(currentCompositeComponent);
    }
  }
} 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:21,代码来源:UIXComponentBase.java

示例2: broadcastInContext

import javax.faces.component.UIComponent; //导入方法依赖的package包/类
/**
 * Broadcast the FacesEvent after updating the current component and
 * current composite component
 * 
 * @param context The current instance of FacesContext
 * @param event The FacesEvent to be broadcasted
 */
public static void broadcastInContext(FacesContext context, FacesEvent event)
{
  UIComponent component = event.getComponent();
  UIComponent compositeParent = null;
  RequestContext requestContext = RequestContext.getCurrentInstance();
  if (!UIComponent.isCompositeComponent(component))
  {
    compositeParent = UIComponent.getCompositeComponentParent(component);
    if (compositeParent != null) 
    {
      requestContext.pushCurrentComponent(context, compositeParent);
      compositeParent.pushComponentToEL(context, null);
    }
  }
  requestContext.pushCurrentComponent(context, component);
  component.pushComponentToEL(context, null);
  try
  {
    component.broadcast(event);
  }
  finally
  {
    component.popComponentFromEL(context);
    requestContext.popCurrentComponent(context, component);
    if (compositeParent != null) 
    {
      compositeParent.popComponentFromEL(context);
      requestContext.popCurrentComponent(context, compositeParent);
    }
  }
} 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:39,代码来源:UIXComponent.java

本文标签属性:

示例:示例英语

代码:代码生成器

java:javascript18岁

UIComponent:UIComponent

getCompositeComponentParent:getCompositeComponentParent

上一篇:C# FontWeight类代码示例(c#fontweight类典型用法代码示例汇总)
下一篇:Java ReferenceManager类代码示例(javareferencemanager类的典型用法代码示例)

为您推荐