當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。