本文整理汇总了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;未经允许,请勿转载。 |
请发表评论