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


Java ViewStatus类代码示例

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


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

示例1: checkMutable

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * @see LifecycleElement#checkMutable(boolean)
 */
public void checkMutable(boolean legalDuringInitialization) {
    if (UifConstants.ViewStatus.CACHED.equals(viewStatus)) {
        ViewLifecycle.reportIllegalState("Cached component " + getClass() + " " + getId()
                + " is immutable, use copy() to get a mutable instance");
        return;
    }

    if (ViewLifecycle.isActive()) {
        return;
    }

    if (UifConstants.ViewStatus.CREATED.equals(viewStatus) && !legalDuringInitialization) {
        ViewLifecycle.reportIllegalState(
                "View has not been fully initialized, attempting to change component " + getClass() + " "
                        + getId());
        return;
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:ComponentBase.java

示例2: checkMutable

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * @see LifecycleElement#checkMutable(boolean)
 */
public void checkMutable(boolean legalDuringInitialization) {
    if (UifConstants.ViewStatus.CACHED.equals(viewStatus)) {
        ViewLifecycle.reportIllegalState("Cached layout manager " + getClass() + " " + getId()
                + " is immutable, use copy() to get a mutable instance");
        return;
    }

    if (ViewLifecycle.isActive()) {
        return;
    }

    if (UifConstants.ViewStatus.CREATED.equals(viewStatus)) {
        if (!legalDuringInitialization) {
            ViewLifecycle.reportIllegalState(
                    "View has not been fully initialized, attempting to change layout manager "
                            + getClass() + " " + getId());
            return;
        }
    } else {
        ViewLifecycle.reportIllegalState("Layout manager " + getClass() + " " + getId()
                + " has been initialized, but the lifecycle is not active.");
        return;
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:LayoutManagerBase.java

示例3: View

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
public View() {
    singlePageView = false;
    mergeWithPageItems = true;
    translateCodesOnReadOnlyDisplay = false;
    viewTypeName = ViewType.DEFAULT;
    viewStatus = ViewStatus.CREATED;
    formClass = UifFormBase.class;
    supportsRequestOverrideOfReadOnlyFields = true;
    disableBrowserCache = true;
    persistFormToSession = true;
    sessionPolicy = new ViewSessionPolicy();

    idSequence = 0;
    this.viewIndex = new ViewIndex();
    preloadPoolSize = 0;

    additionalScriptFiles = new ArrayList<String>();
    additionalCssFiles = new ArrayList<String>();
    items = new ArrayList<Group>();
    objectPathToConcreteClassMapping = new HashMap<String, Class<?>>();
    viewRequestParameters = new HashMap<String, String>();
    expressionVariables = new HashMap<String, String>();

    dialogs = new ArrayList<Group>();
    viewTemplates = new ArrayList<String>();
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:27,代码来源:View.java

示例4: getViewById

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.uif.service.ViewService#getViewById(java.lang.String)
 */
public View getViewById(String viewId) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("retrieving view instance for id: " + viewId);
    }

    View view = dataDictionaryService.getViewById(viewId);
    if (view == null) {
        LOG.warn("View not found for id: " + viewId);
    } else {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Updating view status to CREATED for view: " + view.getId());
        }
        view.setViewStatus(ViewStatus.CREATED);
    }

    return view;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:21,代码来源:ViewServiceImpl.java

示例5: getViewByType

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * Retrieves the <code>ViewTypeService</code> for the given view type, then builds up the index based
 * on the supported view type parameters and queries the dictionary service to retrieve the view
 * based on its type and index
 *
 * @see org.kuali.rice.krad.uif.service.ViewService#getViewByType(org.kuali.rice.krad.uif.UifConstants.ViewType,
 *      java.util.Map<java.lang.String,java.lang.String>)
 */
public View getViewByType(ViewType viewType, Map<String, String> parameters) {
    ViewTypeService typeService = getViewTypeService(viewType);
    if (typeService == null) {
        throw new RuntimeException("Unable to find view type service for view type name: " + viewType);
    }

    Map<String, String> typeParameters = typeService.getParametersFromRequest(parameters);

    View view = dataDictionaryService.getViewByTypeIndex(viewType, typeParameters);
    if (view == null) {
        LOG.warn("View not found for type: " + viewType);
    } else {
        LOG.debug("Updating view status to CREATED for view: " + view.getId());
        view.setViewStatus(ViewStatus.CREATED);
    }

    return view;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:27,代码来源:ViewServiceImpl.java

示例6: ComponentBase

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
public ComponentBase() {
    super();

    order = 0;
    colSpan = 1;
    rowSpan = 1;
    cssGridSizes = new CssGridSizes();

    viewStatus = ViewStatus.CREATED;

    render = true;
    canCopyOnReadOnly = false;
    selfRendered = false;
    progressiveRenderViaAJAX = false;
    progressiveRenderAndRefresh = false;
    refreshedByAction = false;
    resetDataOnRefresh = false;
    disableSessionPersistence = false;
    forceSessionPersistence = false;

    phasePathMapping = new HashMap<String, String>();
    context = Collections.emptyMap();
    dataAttributes = Collections.emptyMap();
    scriptDataAttributes = Collections.emptyMap();
    ariaAttributes = Collections.emptyMap();
    templateOptions = Collections.emptyMap();

    cssClasses = Collections.emptyList();
    libraryCssClasses = Collections.emptyList();
    additionalCssClasses = Collections.emptyList();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:ComponentBase.java

示例7: setViewStatus

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * Setter for the view status
 *
 * @param status view status
 */
@Override
public void setViewStatus(String status) {
    if (!UifConstants.ViewStatus.CREATED.equals(status) && !UifConstants.ViewStatus.CACHED.equals(status)) {
        checkMutable(true);
    }

    this.viewStatus = status;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:ComponentBase.java

示例8: clone

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public ComponentBase clone() throws CloneNotSupportedException {
    ComponentBase copy = (ComponentBase) super.clone();

    // Copy initialized status, but reset to created for others.
    // This allows prototypes to bypass repeating the initialized phase.
    if (UifConstants.ViewStatus.INITIALIZED.equals(viewStatus)) {
        copy.viewStatus = UifConstants.ViewStatus.INITIALIZED;
    } else {
        copy.viewStatus = UifConstants.ViewStatus.CREATED;
    }

    return copy;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:ComponentBase.java

示例9: clone

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
@Override
public LayoutManagerBase clone() throws CloneNotSupportedException {
    LayoutManagerBase copy = (LayoutManagerBase) super.clone();

    // Copy initialized status, but reset to created for others.
    // This allows prototypes to bypass repeating the initialized phase.
    if (UifConstants.ViewStatus.INITIALIZED.equals(viewStatus)) {
        copy.viewStatus = UifConstants.ViewStatus.INITIALIZED;
    } else {
        copy.viewStatus = UifConstants.ViewStatus.CREATED;
    }

    return copy;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:LayoutManagerBase.java

示例10: isMutable

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * @see LifecycleElement#isMutable(boolean)
 */
public boolean isMutable(boolean legalDuringInitialization) {
    return (UifConstants.ViewStatus.CREATED.equals(viewStatus) && legalDuringInitialization) || ViewLifecycle
            .isActive();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:ComponentBase.java

示例11: isMutable

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * @see LifecycleElement#isMutable(boolean)
 */
public boolean isMutable(boolean legalDuringInitialization) {
    return (UifConstants.ViewStatus.CREATED.equals(viewStatus) && legalDuringInitialization)
            || ViewLifecycle.isActive();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:LayoutManagerBase.java

示例12: performViewLifecycle

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * Initializes a newly created <code>View</code> instance. Each component of the tree is invoked
 * to perform setup based on its configuration. In addition helper service methods are invoked to
 * perform custom initialization
 *
 * @param view - view instance to initialize
 * @param model - object instance containing the view data
 * @param parameters - Map of key values pairs that provide configuration for the <code>View</code>, this
 * is generally comes from the request and can be the request parameter Map itself. Any parameters
 * not valid for the View will be filtered out
 */
protected void performViewLifecycle(View view, Object model, Map<String, String> parameters) {
    // get the configured helper service for the view
    ViewHelperService helperService = view.getViewHelperService();

    // invoke initialize phase on the views helper service
    if (LOG.isEnabledFor(Priority.INFO)) {
        LOG.info("performing initialize phase for view: " + view.getId());
    }
    helperService.performInitialization(view, model);

    // do indexing                               
    if (LOG.isDebugEnabled()) {
        LOG.debug("processing indexing for view: " + view.getId());
    }
    view.index();

    // update status on view
    if (LOG.isDebugEnabled()) {
        LOG.debug("Updating view status to INITIALIZED for view: " + view.getId());
    }
    view.setViewStatus(ViewStatus.INITIALIZED);

    // Apply Model Phase
    if (LOG.isEnabledFor(Priority.INFO)) {
        LOG.info("performing apply model phase for view: " + view.getId());
    }
    helperService.performApplyModel(view, model);

    // do indexing
    if (LOG.isEnabledFor(Priority.INFO)) {
        LOG.info("reindexing after apply model for view: " + view.getId());
    }
    view.index();

    // Finalize Phase
    if (LOG.isEnabledFor(Priority.INFO)) {
        LOG.info("performing finalize phase for view: " + view.getId());
    }
    helperService.performFinalize(view, model);

    // do indexing
    if (LOG.isEnabledFor(Priority.INFO)) {
        LOG.info("processing final indexing for view: " + view.getId());
    }
    view.index();

    // update status on view
    if (LOG.isDebugEnabled()) {
        LOG.debug("Updating view status to FINAL for view: " + view.getId());
    }
    view.setViewStatus(ViewStatus.FINAL);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:64,代码来源:ViewServiceImpl.java

示例13: isInitialized

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * Indicates whether the component has been initialized.
 *
 * @return True if the component has been initialized, false if not.
 */
public boolean isInitialized() {
    return StringUtils.equals(viewStatus, ViewStatus.INITIALIZED) || isModelApplied();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:ComponentBase.java

示例14: isModelApplied

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * Indicates whether the component has been updated from the model.
 *
 * @return True if the component has been updated, false if not.
 */
public boolean isModelApplied() {
    return StringUtils.equals(viewStatus, ViewStatus.MODEL_APPLIED) || isFinal();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:ComponentBase.java

示例15: isFinal

import org.kuali.rice.krad.uif.UifConstants.ViewStatus; //导入依赖的package包/类
/**
 * Indicates whether the component has been updated from the model and final updates made.
 *
 * @return True if the component has been updated, false if not.
 */
public boolean isFinal() {
    return StringUtils.equals(viewStatus, ViewStatus.FINAL) || isRendered();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:ComponentBase.java


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