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

Java PartialViewContext类代码示例

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

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



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

示例1: processAction

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
/**
 * Handle the reset input action as follows, only and only if the current request is an ajax request and the
 * {@link PartialViewContext#getRenderIds()} does not return an empty collection nor is the same as
 * {@link PartialViewContext#getExecuteIds()}: find all {@link EditableValueHolder} components based on
 * {@link PartialViewContext#getRenderIds()} and if the component is not covered by
 * {@link PartialViewContext#getExecuteIds()}, then invoke {@link EditableValueHolder#resetValue()} on the
 * component.
 * @throws IllegalArgumentException When one of the client IDs resolved to a <code>null</code> component. This
 * would however indicate a bug in the concrete {@link PartialViewContext} implementation which is been used.
 */
@Override
public void processAction(ActionEvent event) throws AbortProcessingException {
	FacesContext context = FacesContext.getCurrentInstance();
	PartialViewContext partialViewContext = context.getPartialViewContext();

	if (partialViewContext.isAjaxRequest()) {
		Collection<String> renderIds = getRenderIds(partialViewContext);

		if (!renderIds.isEmpty() && !partialViewContext.getExecuteIds().containsAll(renderIds)) {
			context.getViewRoot().visitTree(createVisitContext(context, renderIds, VISIT_HINTS), VISIT_CALLBACK);
		}
	}

	if (wrapped != null && event != null) {
		wrapped.processAction(event);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:28,代码来源:ResetInputAjaxActionListener.java


示例2: resetPickList

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
public void resetPickList() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot viewRoot = facesContext.getViewRoot();
    PartialViewContext partialViewContext = facesContext.getPartialViewContext();
    Collection<String> renderIds = partialViewContext.getRenderIds();

    for (String renderId : renderIds) {
        try {
            UIComponent component = viewRoot.findComponent(renderId);
            if (component instanceof PickList) {
                PickList pickList = (PickList) component;
                pickList.resetValue();
            }
        } catch (Exception e) {
            logger.error(e);
        }

        //logger.info("{0} {1}", new Object[]{renderId, component});
    }
}
 
开发者ID:wbstr,项目名称:liferay-newsletter,代码行数:21,代码来源:NewsletterEditController.java


示例3: getPartialViewContext

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
@Override
public PartialViewContext getPartialViewContext()
{
  if (_partialViewContext == null)
  {
    PartialViewContextFactory f = (PartialViewContextFactory)
                    FactoryFinder.getFactory(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY);
    _partialViewContext = f.getPartialViewContext(this);
  }

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


示例4: getRenderIds

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
/**
 * Helper method with RichFaces4 hack to return the proper render IDs from the given partial view context.
 * @param partialViewContext The partial view context to return the render IDs for.
 * @return The render IDs.
 */
private static Collection<String> getRenderIds(PartialViewContext partialViewContext) {
	Collection<String> renderIds = partialViewContext.getRenderIds();

	// WARNING: START OF HACK! ------------------------------------------------------------------------------------
	// HACK for RichFaces4 because its ExtendedPartialViewContextImpl class doesn't return its componentRenderIds
	// property on getRenderIds() call when the action is executed using a RichFaces-specific command button/link.
	// See also https://issues.jboss.org/browse/RF-11112
	//if (renderIds.isEmpty() && Hacks.isRichFacesInstalled()) {
	//	renderIds = Hacks.getRichFacesRenderIds();
	//}
	// END OF HACK ------------------------------------------------------------------------------------------------

	return renderIds;
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:20,代码来源:ResetInputAjaxActionListener.java


示例5: getPartialViewContext

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
public PartialViewContext getPartialViewContext()
{
  return _mockPartialContext;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:5,代码来源:MockFacesContext12.java


示例6: isAjaxRequest

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
private boolean isAjaxRequest() {
    PartialViewContext partialViewContext =
            FacesContext.getCurrentInstance().getPartialViewContext();
    return null != partialViewContext && partialViewContext.isAjaxRequest();
}
 
开发者ID:stefanoberdoerfer,项目名称:exmatrikulator,代码行数:6,代码来源:CommonDataController.java


示例7: getPartialViewContext

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
public PartialViewContext getPartialViewContext(FacesContext context) {
	return new TFPartialViewContext(wrapped.getPartialViewContext(context));
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:4,代码来源:TFViewContextFactory.java


示例8: TFPartialViewContext

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
public TFPartialViewContext(PartialViewContext wrapped) {
	this.wrapped = wrapped;
	this.writer = new TFPartialResponseWriter(wrapped.getPartialResponseWriter());
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:5,代码来源:TFPartialViewContext.java


示例9: getWrapped

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
public PartialViewContext getWrapped() {
	return wrapped;
}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:4,代码来源:TFPartialViewContext.java


示例10: isAjaxRequest

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
protected boolean isAjaxRequest() {
    PartialViewContext partialViewContext = FacesContext.getCurrentInstance().getPartialViewContext();
    return partialViewContext != null && partialViewContext.isAjaxRequest();
}
 
开发者ID:noveogroup,项目名称:clap,代码行数:5,代码来源:BaseController.java


示例11: getPartialViewContext

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
@Override
public PartialViewContext getPartialViewContext() {
    return FacesContextUtil.getFacesContext().getPartialViewContext();
}
 
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:5,代码来源:AlternativeFacesContext.java


示例12: addPartialViewRender

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
public static void addPartialViewRender(String id) {
    PartialViewContext pcontext = FacesContext.getCurrentInstance().getPartialViewContext();
    if (pcontext != null) {
        pcontext.getRenderIds().add(id);
    }
}
 
开发者ID:wbstr,项目名称:liferay-newsletter,代码行数:7,代码来源:JsfUtil.java


示例13: getPartialViewContext

import javax.faces.context.PartialViewContext; //导入依赖的package包/类
/**
 * Creates a PartialViewContext instance that is optimized for Trinidad PPR.
 * @param context 
 * @return a PartialViewContext instance
 */
public PartialViewContext getPartialViewContext(FacesContext context)
{
  return new PartialViewContextImpl(context);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:10,代码来源:PartialViewContextFactoryImpl.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java Data类代码示例发布时间:2022-05-23
下一篇:
Java IIntroPart类代码示例发布时间: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