• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java VisitHint类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _processExecute

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
private void _processExecute(UIViewRoot component, PhaseId phaseId)
{
  // We are only handling visit-based (partial) execution here.
  // Full execution (isExecuteAll() == true) is handled by the UIViewRoot
  // Note that this is different from the render phase

  Collection<String> executeIds = getExecuteIds();
  if (executeIds == null || executeIds.isEmpty())
  {
    _LOG.warning("No execute Ids were supplied for the Ajax request");
    return;
  }

  VisitContext visitContext = VisitContext.createVisitContext(_context, executeIds,
                      EnumSet.of(VisitHint.SKIP_UNRENDERED, VisitHint.EXECUTE_LIFECYCLE));
  VisitCallback visitCallback = new ProcessPhaseCallback(_context, phaseId);

  component.visitTree(visitContext, visitCallback);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:20,代码来源:PartialViewContextImpl.java


示例2: visitAllChildren

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
/**
 * Default implementation of visiting children that visits all children without iterating
 * @param visitContext the <code>VisitContext</code> for this visit
 * @param callback the <code>VisitCallback</code> instance
 * @return <code>true</code> if the visit is complete.
 */
protected final boolean visitAllChildren(
  VisitContext  visitContext,
  VisitCallback callback)
{
  // visit the children of the component
  Iterator<UIComponent> kids =
    visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED) ?
      getRenderedFacetsAndChildren(visitContext.getFacesContext()) :
      getFacetsAndChildren();

  while (kids.hasNext())
  {
    // If any kid visit returns true, we are done.
    if (kids.next().visitTree(visitContext, callback))
    {
      return true;
    }
  }

  return false;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:28,代码来源:UIXComponent.java


示例3: createVisitContext

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
public static VisitContext createVisitContext(
 FacesContext       context,
 Collection<String> ids,
 Set<VisitHint>     hints,
 PhaseId            phaseId)
{
  return VisitTreeUtils.createVisitContext(context, ids, hints);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:9,代码来源:MVisitContextFactory.java


示例4: _isVisitable

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
/**
 * default implementation checking the <code>VisitHint.SKIP_TRANSIENT</code> and
 * <code>VisitHint.SKIP_UNRENDERED</code> hints.
 */
private static boolean _isVisitable(VisitContext visitContext, UIComponent component)
{
  Collection<VisitHint> hints = visitContext.getHints();

  if (hints.contains(VisitHint.SKIP_TRANSIENT) && component.isTransient())
    return false;

  if (hints.contains(VisitHint.SKIP_UNRENDERED) && !component.isRendered())
    return false;

  return true;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:UIXComponent.java


示例5: visitTree

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
public boolean visitTree(
  VisitContext  visitContext,
  VisitCallback callback)
{
  if (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED))
  {
    // Filter which children to be visited so that only one show detail
    // is visited for this show one component
    visitContext = new PartialVisitContext(visitContext);
  }
  return super.visitTree(visitContext, callback);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:UIXShowOneTemplate.java


示例6: visitData

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
protected boolean visitData(
  VisitContext  visitContext,
  VisitCallback callback)
{
  // if we are only visiting rendered stamps, then pass in the disclosed row keys, otherwise
  // pass in null, indicating that all row keys should be visited
  RowKeySet disclosedRowKeys = (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED))
                                 ? getDisclosedRowKeys()
                                 : null;

  return visitHierarchy(visitContext, callback, getStamps(), disclosedRowKeys);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:14,代码来源:UIXTreeTemplate.java


示例7: visitData

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
protected boolean visitData(
  VisitContext  visitContext,
  VisitCallback callback)
{
  Object oldPath = getRowKey();

  // if we are only visiting rendered stamps, then pass in the disclosed row keys, otherwise
  // pass in null, indicating that all row keys should be visited
  RowKeySet disclosedRowKeys = (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED))
                                 ? getDisclosedRowKeys()
                                 : null;

  setRowKey(null);

  boolean done;
  
  try
  {
    done = visitHierarchy(visitContext, callback, getStamps(), disclosedRowKeys);
  }
  finally
  {
    setRowKey(oldPath);
  }
  
  return done;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:29,代码来源:UIXPageTemplate.java


示例8: visitData

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
protected boolean visitData(
  VisitContext  visitContext,
  VisitCallback callback)
{
  Object oldRowKey = getRowKey();

  // if we are only visiting rendered stamps, then pass in the disclosed row keys, otherwise
  // pass in null, indicating that all row keys should be visited
  RowKeySet disclosedRowKeys = (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED))
                                 ? getDisclosedRowKeys()
                                 : null;

  boolean done;

  HierarchyUtils.__setStartDepthPath(this, getStartLevel());

  try
  {
    done = visitHierarchy(visitContext, callback, getStamps(), disclosedRowKeys);
  }
  finally
  {
    setRowKey(oldRowKey);
  }

  return done;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:29,代码来源:UIXNavigationTreeTemplate.java


示例9: visitTree

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
public boolean visitTree(
  VisitContext  visitContext,
  VisitCallback callback)
{
  if (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED) &&
   !isDiscloseMany())
  {
    // Filter which children to be visited so that only one show detail
    // is visited for this accordion
    visitContext = new PartialVisitContext(visitContext);
  }
  return super.visitTree(visitContext, callback);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:15,代码来源:CorePanelAccordionTemplate.java


示例10: VisitContextImpl

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
public VisitContextImpl(FacesContext facesContext, Set<VisitHint> hints) {
    this.facesContext = facesContext;

    final EnumSet<VisitHint> hintsEnumSet = ((hints == null) || (hints.isEmpty()))
            ? EnumSet.noneOf(VisitHint.class)
            : EnumSet.copyOf(hints);

    this.hints = Collections.unmodifiableSet(hintsEnumSet);
}
 
开发者ID:ButterFaces,项目名称:ButterFaces,代码行数:10,代码来源:VisitContextImpl.java


示例11: requiresRowIteration

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
private boolean requiresRowIteration(VisitContext ctx) {
	boolean shouldIterate = !ctx.getHints().contains(VisitHint.SKIP_ITERATION);
	if (!shouldIterate) {
		FacesContext faces = ctx.getFacesContext();
		String sourceId = faces.getExternalContext().getRequestParameterMap().get("javax.faces.source");
		boolean containsSource = sourceId != null
				? sourceId.startsWith(super.getClientId(faces) + getSeparatorChar(faces))
				: false;
		return containsSource;
	} else {
		return shouldIterate;
	}
}
 
开发者ID:TheCoder4eu,项目名称:BootsFaces-OSP,代码行数:14,代码来源:TabRepeat.java


示例12: isVisitable

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
private static boolean isVisitable(VisitContext context,
		UIComponent component) {
	Collection hints = context.getHints();
	if ((hints.contains(VisitHint.SKIP_TRANSIENT))
			&& (component.isTransient())) {
		return false;
	}
	return ((!(hints.contains(VisitHint.SKIP_UNRENDERED))) || (component
			.isRendered()));
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:11,代码来源:XspQuery.java


示例13: isVisitable

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private static boolean isVisitable(final VisitContext context,
		final UIComponent component) {
	Collection hints = context.getHints();
	if ((hints.contains(VisitHint.SKIP_TRANSIENT))
			&& (component.isTransient())) {
		return false;
	}
	return ((!(hints.contains(VisitHint.SKIP_UNRENDERED))) || (component
			.isRendered()));
}
 
开发者ID:jesse-gallagher,项目名称:XPages-Scaffolding,代码行数:12,代码来源:XspQuery.java


示例14: getHints

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
public Set<VisitHint> getHints()
{
  return _PPR_VISIT_HINTS;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:5,代码来源:PartialPageContextImpl.java


示例15: _isEncodingVisit

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
/**
 * Returns <code>true</code> if the components are being visited
 * for the purpose of encoding.
 */
private static boolean _isEncodingVisit(VisitContext visitContext)
{
  return(visitContext.getHints().contains(VisitHint.EXECUTE_LIFECYCLE) &&
         FacesContext.getCurrentInstance().getCurrentPhaseId() == PhaseId.RENDER_RESPONSE);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:10,代码来源:UIXComponent.java


示例16: getHints

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
public Set<VisitHint> getHints() {
    return hints;
}
 
开发者ID:ButterFaces,项目名称:ButterFaces,代码行数:5,代码来源:VisitContextImpl.java


示例17: requiresRowIteration

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
private boolean requiresRowIteration(VisitContext context) {
    return !context.getHints().contains(VisitHint.SKIP_ITERATION);
}
 
开发者ID:ButterFaces,项目名称:ButterFaces,代码行数:4,代码来源:UIDataAdaptor.java


示例18: getHints

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
@Override
public Set<VisitHint> getHints() {
	Set<VisitHint> hints = new HashSet<VisitHint>();
	hints.add(VisitHint.SKIP_TRANSIENT);
	return hints;
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:7,代码来源:XspQuery.java


示例19: createVisitContext

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
/**
 * <p>Creates a VisitContext instance for use with
 * {@link UIComponent#visitTree}.</p>
 *
 * @param context the FacesContext for the current request
 * @param ids the client ids of the components to visit.  If null,
 *   all components will be visited.
 * @param hints the VisitHints to apply to the visit
 * @param phaseId.  ignored.
 * @return a VisitContext instance that is initialized with the
 *   specified ids and hints.
 * @deprecated use {@link VisitContext#createVisitContext(FacesContext, Collection<String>, Set<VisitHint>)} instead
 */
public final VisitContext createVisitContext(
  FacesContext context,
  Collection<String> ids,
  Set<VisitHint> hints,
  PhaseId phaseId)
{
  return VisitContext.createVisitContext(context, ids, hints);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:22,代码来源:RequestContext.java


示例20: createVisitContext

import javax.faces.component.visit.VisitHint; //导入依赖的package包/类
/**
 * <p>Creates a VisitContext instance for use with
 * {@link javax.faces.component.UIComponent#visitTree}.</p>
 *
 * @param context the FacesContext for the current request
 * @param ids the client ids of the components to visit.  If null,
 *   all components will be visited.
 * @param hints the VisitHints to apply to the visit
 * @return a VisitContext instance that is initialized with the
 *   specified ids and hints.
 * @deprecated Method is no longer needed and duplicates the functionality provided by
 *   {@link VisitContext#createVisitContext(FacesContext, Collection<String>, Set<VisitHint>)}
 */
@Deprecated
public static VisitContext createVisitContext(
  FacesContext context,
  Collection<String> ids,
  Set<VisitHint> hints)
{
  return VisitContext.createVisitContext(context, ids, hints);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:22,代码来源:VisitTreeUtils.java



注:本文中的javax.faces.component.visit.VisitHint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PubSubProvider类代码示例发布时间:2022-05-23
下一篇:
Java DefaultBucketSettings类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap