当前位置: 首页>>代码示例>>Java>>正文


Java ExtLibUtil.isXPages852方法代码示例

本文整理汇总了Java中com.ibm.xsp.extlib.util.ExtLibUtil.isXPages852方法的典型用法代码示例。如果您正苦于以下问题:Java ExtLibUtil.isXPages852方法的具体用法?Java ExtLibUtil.isXPages852怎么用?Java ExtLibUtil.isXPages852使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ibm.xsp.extlib.util.ExtLibUtil的用法示例。


在下文中一共展示了ExtLibUtil.isXPages852方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: restoreValueHolderState

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")//$NON-NLS-1$
@Override
protected void restoreValueHolderState(FacesContext context,
        UIComponent component) {
    super.restoreValueHolderState(context, component);

    // start workaround for MKEE89RPXF
    if (ExtLibUtil.isXPages852()) {
        if (component.getFacetCount() > 0) {
            Map<String, UIComponent> facets;
            if (disableGetFacets && component == this) {
                facets = super.getFacets();
            }
            else {
                facets = TypedUtil.getFacets(component);
            }
            for (UIComponent c : facets.values()) {
                if (c != null) {
                    restoreValueHolderState(context, c);
                }
            }
        }
    }
    // end workaround for MKEE89RPXF
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:AbstractDataView.java

示例2: saveValueHolderState

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")//$NON-NLS-1$
@Override
protected void saveValueHolderState(FacesContext context,
        UIComponent component) {
    super.saveValueHolderState(context, component);

    // start workaround for MKEE89RPXF
    if (ExtLibUtil.isXPages852()) {
        if (component.getFacetCount() > 0) {
            Map<String, UIComponent> facets;
            if (disableGetFacets && component == this) {
                facets = super.getFacets();
            }
            else {
                facets = TypedUtil.getFacets(component);
            }
            for (UIComponent c : facets.values()) {
                if (c != null) {
                    saveValueHolderState(context, c);
                }
            }
        }
    }
    // end workaround for MKEE89RPXF
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:AbstractDataView.java

示例3: addEncodeResource

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@SuppressWarnings("unchecked") // $NON-NLS-1$
public static void addEncodeResource(UIViewRootEx rootEx, Resource resource) {
    if(ExtLibUtil.isXPages852()) {
        // The XPages runtime add all the resources and does a check when it starts to
        // generate all the resources at the very end.
        // For performance reasons, and until the XPages runtime optimizes this, we ensure
        // that the same resource (the exact same object - identity comparison) is not
        // added multiple times.
        // Already optimized in post 852
        IdentityHashMap<Resource, Boolean> m = (IdentityHashMap<Resource, Boolean>)rootEx.getEncodeProperty("extlib.EncodeResource"); // $NON-NLS-1$
        if(m==null) {
            m = new IdentityHashMap<Resource, Boolean>();
        } else {
            if(m.containsKey(resource)) {
                return;
            }
        }
        m.put(resource, Boolean.TRUE);
    }
    rootEx.addEncodeResource(resource);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:22,代码来源:ExtLibResources.java

示例4: getDocumentUrl

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
public String getDocumentUrl() {
    // Prevent the URL to be generated when onclick is set - This is for 852 only
    if(ExtLibUtil.isXPages852()) {
        if(StringUtil.isNotEmpty(getOnclick())) {
            return null;
        }
    }
    return super.getDocumentUrl();
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:UIDynamicViewPanel.java

示例5: setRowIndex

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
public void setRowIndex(int index) {
    // disableGetFacets used to prevent an infinite loop when there
    // are both facets on the data view control, and some facet on the
    // rowComponent or any descendant control, related to MKEE89RPXF.
    if (ExtLibUtil.isXPages852()) {
        disableGetFacets = true;
    }
    try {
        super.setRowIndex(index);
    }
    finally {
        disableGetFacets = false;
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:16,代码来源:AbstractDataView.java

示例6: processDecodes

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
public void processDecodes(FacesContext context) {
    if (ExtLibUtil.isXPages852()) {
        processFacetsForPhase = PhaseId.APPLY_REQUEST_VALUES;
    }
    try {
        super.processDecodes(context);
    }
    finally {
        processFacetsForPhase = null;
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:AbstractDataView.java

示例7: processUpdates

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
public void processUpdates(FacesContext context) {
    if (ExtLibUtil.isXPages852()) {
        processFacetsForPhase = PhaseId.UPDATE_MODEL_VALUES;
    }
    try {
        super.processUpdates(context);
    }
    finally {
        processFacetsForPhase = null;
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:AbstractDataView.java

示例8: processValidators

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
public void processValidators(FacesContext context) {
    if (ExtLibUtil.isXPages852()) {
        processFacetsForPhase = PhaseId.PROCESS_VALIDATIONS;
    }
    try {
        super.processValidators(context);
    }
    finally {
        processFacetsForPhase = null;
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:13,代码来源:AbstractDataView.java

示例9: revokeControlData

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
@Override
protected void revokeControlData(List<ShadowedObject> shadowedObjects,
        FacesContext context) {
    if (null != processFacetsForPhase && ExtLibUtil.isXPages852()) {
        try {
            // workaround for SPR#MKEE8BFEDR: Repeat, input values in header
            // are not processed when submitted.
            if (getFacetCount() > 0) {
                int phaseOrdinal = processFacetsForPhase.getOrdinal();
                for (UIComponent facet : TypedUtil.getFacets(this).values()) {
                    if (!facet.isRendered()) {
                        continue;
                    }
                    if (phaseOrdinal == PhaseId.APPLY_REQUEST_VALUES
                            .getOrdinal()) {
                        facet.processDecodes(context);
                        continue;
                    }
                    if (phaseOrdinal == PhaseId.UPDATE_MODEL_VALUES
                            .getOrdinal()) {
                        facet.processUpdates(context);
                        continue;
                    }
                    if (phaseOrdinal == PhaseId.PROCESS_VALIDATIONS
                            .getOrdinal()) {
                        facet.processValidators(context);
                        continue;
                    }
                }
            }
        }
        finally {
            processFacetsForPhase = null;
        }
    }
    super.revokeControlData(shadowedObjects, context);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:38,代码来源:AbstractDataView.java

示例10: writeRows

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
protected void writeRows(FacesContext context, ResponseWriter w, AbstractDataView c, ViewDefinition viewDef, int first, int rows) throws IOException {
    try {
        // Initialize the view definition
        viewDef.first = first;
        viewDef.rows = rows;

        beforeRows(context, w, c, viewDef);
        
        // Horrible fix for 852...
        if(ExtLibUtil.isXPages852()) {
            // We use the offset that was previously stored when we read the very first row
            // This assumes that the view had been already read from the beginning.
            Object o = c.getAttributes().get("__view_indent_offset"); // $NON-NLS-1$
            if(o instanceof Integer) {
                viewDef.indentOffset = (Integer)o;
            }
        }
        
        for(int i=0; i<rows; i++) {
            int index = first+i;
            c.setRowIndex(index);
            if(!c.isRowAvailable()) {
                if(index == 0 && c instanceof UIForumView){
                    w.startElement("li", null); //$NON-NLS-1$
                    w.writeComment("no content"); //$NON-NLS-1$
                    w.endElement("li"); //$NON-NLS-1$
                }
                break;
            }
            if(ExtLibUtil.isXPages852()) {
                if(index==0) {
                    // There is a bug in the view datamodel in 852
                    // When the view do start from the root level (ex: from a parent id), then 
                    viewDef.indentOffset = Math.max(0,calculateIndentOffset(context, c, viewDef));
                    if(viewDef.indentOffset>0) {
                        TypedUtil.getAttributes(c).put("__view_indent_offset",Integer.valueOf(viewDef.indentOffset)); // $NON-NLS-1$
                    }
                }
            }
            beforeRow(context, w, c, viewDef);
            writeRow(context, w, c, viewDef);
            afterRow(context, w, c, viewDef);
        }

        afterRows(context, w, c, viewDef);
    } finally {
        //reset
        c.setRowIndex(-1);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:51,代码来源:AbstractDataViewRenderer.java


注:本文中的com.ibm.xsp.extlib.util.ExtLibUtil.isXPages852方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。