本文整理汇总了Java中com.ibm.xsp.util.FacesUtil.isClientIdChildOf方法的典型用法代码示例。如果您正苦于以下问题:Java FacesUtil.isClientIdChildOf方法的具体用法?Java FacesUtil.isClientIdChildOf怎么用?Java FacesUtil.isClientIdChildOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.util.FacesUtil
的用法示例。
在下文中一共展示了FacesUtil.isClientIdChildOf方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isDialogRequest
import com.ibm.xsp.util.FacesUtil; //导入方法依赖的package包/类
public boolean isDialogRequest(FacesContextEx context) {
// The current panel is the current one if the request is
// a partial refresh, where the panel is the target component
if(context.isAjaxPartialRefresh()) {
String id = context.getPartialRefreshId();
if(DIALOG_NEXT) {
if(FacesUtil.isClientIdChildOf(context, this, id)) {
return true;
}
} else {
if(FacesUtil.isClientIdChildOf(context, getPopupContent(), id)) {
return true;
}
}
}
return false;
}
示例2: isDynamicTooltipRequest
import com.ibm.xsp.util.FacesUtil; //导入方法依赖的package包/类
public boolean isDynamicTooltipRequest(FacesContextEx context) {
// The current panel is the current one if the request is
// a partial refresh, where the panel is the target component
if(isDynamicContent() && context.isAjaxPartialRefresh()) {
String id = context.getPartialRefreshId();
if(FacesUtil.isClientIdChildOf(context, getPopupContent(), id)) {
return true;
}
}
return false;
}
示例3: isShouldCreateOrReloadChildren
import com.ibm.xsp.util.FacesUtil; //导入方法依赖的package包/类
private boolean isShouldCreateOrReloadChildren(FacesContextEx context) {
// We should create the children if the request is a partial refresh request
// for the current component, or its page (the mobile page)
if(context.isAjaxPartialRefresh()) {
String id = context.getPartialRefreshId();
UIMobilePage mobilePage = getMobilePage();
if(FacesUtil.isClientIdChildOf(context, mobilePage, id)) {
Map<String, String> params = TypedUtil.getRequestParameterMap(context.getExternalContext());
String pt = params.get("pageTransition"); // $NON-NLS-1$
if(StringUtil.isNotEmpty(pt)) {
// If the content doesn't exist, then create it...
if(!isContentCreated()) {
return true;
}
// A parameter is the url has a greater priority
String resetParam = params.get(UIMobilePage.PARAM_RESET);
if(StringUtil.equals(resetParam, "true")) { // $NON-NLS-1$
return true;
}
if(StringUtil.equals(resetParam, "false")) { // $NON-NLS-1$
return false;
}
// Else use the default page option
return mobilePage.isResetContent();
}
}
}
return false;
}
示例4: encodeBegin
import com.ibm.xsp.util.FacesUtil; //导入方法依赖的package包/类
@Override
public void encodeBegin(FacesContext context, UIComponent component)
throws IOException {
Integer mode = NOTHING;
if (component.isRendered()) {
FacesContextEx contextEx = (FacesContextEx) context;
UIDojoContentPane c = (UIDojoContentPane) component;
// If the request is a partial refresh
if (contextEx.isAjaxPartialRefresh()) {
String refreshId = contextEx.getPartialRefreshId();
// If it targets the current component, then it might be
// - for a full refresh of the panel
// - for a refresh of only its children (from an href attribute)
if (StringUtil.equals(refreshId, c.getClientId(contextEx))) {
// Detect if it is a url to only refresh the content of the
// panel
// If not, the this is a partial refresh for the entire
// panel
String ajaxInner = (String)context.getExternalContext().getRequestParameterMap().get("$$ajaxinner"); //$NON-NLS-1$
if (StringUtil.equals(ajaxInner,"content")) { // $NON-NLS-1$
mode = AJXCONTENT;
} else if (StringUtil.equals(ajaxInner,"frame")) { // $NON-NLS-1$
if (c.isPartialRefresh()) {
mode = FRAME;
} else {
mode = FULL;
}
}
}
}
// Else, if it wasn't for the children of this panel
if (mode == NOTHING) {
// If the panel uses partial refresh
if (c.isPartialRefresh()) {
// Only render the frame, unless is is a partial refresh of
// one of its children
if (contextEx.isAjaxPartialRefresh()
&& FacesUtil.isClientIdChildOf(contextEx,
component, contextEx.getPartialRefreshId())) {
mode = AJXCONTENT;
} else {
mode = FRAME;
}
} else {
// The full panel should be rendered
mode = FULL;
}
}
}
HtmlUtil.storeEncodeParameter(context, component, mode);
if ((mode == FULL) || (mode == FRAME)) {
super.encodeBegin(context, component);
newLine(context.getResponseWriter());
}
}