ContextCallback (Java EE 5)

Java EE API


javax.faces.component Interface ContextCallback


public interface ContextCallback


一个简单的回调接口,支持在视图中对特定 UIComponent(facet 或子组件)采取操作,同时保留视图中该组件实例的任何上下文状态。

英文文档:

A simple callback interace that enables taking action on a specific UIComponent (either facet or child) in the view while preserving any contextual state for that component instance in the view.


Method Summary
 void
 

Method Detail

public void invokeContextCallback(FacesContext context, UIComponent target)

此方法将通过 UIComponent#invokeOnComponent 的实现调用,而且必须向此方法传递带有 clientId 的组件,该 clientId 作为 invokeOnComponent 的参数给定。调用此方法的时候,参数 target 对于视图中其祖先而言,保证处于恰当的状态。

context 此请求的 FacesContext
target 通过 clientId 定位的 UIComponent,该 clientId 通过调用 UIComponent#invokeOnComponent 给定。
英文文档:

invokeContextCallback

void invokeContextCallback(FacesContext context,
                           UIComponent target)

This method will be called by an implementation of UIComponent.invokeOnComponent(javax.faces.context.FacesContext, java.lang.String, javax.faces.component.ContextCallback) and must be passed the component with the clientId given as an argument to invokeOnComponent. At the point in time when this method is called, the argument target is guaranteed to be in the proper state with respect to its ancestors in the View.

Parameters:
context - the FacesContext for this request.
target - the UIComponent that was located by clientId by a call to UIComponent.invokeOnComponent(javax.faces.context.FacesContext, java.lang.String, javax.faces.component.ContextCallback).


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!