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


Java FilterableLookupCriteriaControl类代码示例

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


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

示例1: filterSearchCriteria

import org.kuali.rice.krad.uif.control.FilterableLookupCriteriaControl; //导入依赖的package包/类
/**
 * Remove any search criteria that are not part of the database lookup
 *
 * @param searchCriteria the search criteria to be filtered
 * @return the filteredSearchCriteria
 */
public Map<String, String> filterSearchCriteria( Map<String, String> searchCriteria) {
    if (getControl() instanceof FilterableLookupCriteriaControl) {
        return ((FilterableLookupCriteriaControl) getControl()).filterSearchCriteria(getPropertyName(), searchCriteria);
    } else {
        return searchCriteria;
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:14,代码来源:LookupInputField.java

示例2: performFinalize

import org.kuali.rice.krad.uif.control.FilterableLookupCriteriaControl; //导入依赖的package包/类
/**
 * Forces session persistence on the criteria fields so the search criteria can be validated on post.
 *
 * {@inheritDoc}
 */
@Override
public void performFinalize(Object model, LifecycleElement parent) {
    super.performFinalize(model, parent);

    LookupForm lookupForm = (LookupForm) model;
    String viewId = lookupForm.getViewId();

    Map<String, FilterableLookupCriteriaControlPostData> filterableLookupCriteria =
            new HashMap<String, FilterableLookupCriteriaControlPostData>();

    List<InputField> fields = ViewLifecycleUtils.getElementsOfTypeDeep(criteriaGroup, InputField.class);

    for (InputField field : fields) {
        field.setForceSessionPersistence(true);

        String propertyName = field.getPropertyName();

        if (field.getControl() instanceof FilterableLookupCriteriaControl) {
            FilterableLookupCriteriaControl control = (FilterableLookupCriteriaControl) field.getControl();
            filterableLookupCriteria.put(propertyName, control.getPostData(propertyName));
        }
    }

    ViewPostMetadata viewPostMetadata = ViewLifecycle.getViewPostMetadata();
    viewPostMetadata.addComponentPostData(viewId, UifConstants.PostMetadata.FILTERABLE_LOOKUP_CRITERIA,
            filterableLookupCriteria);

    if (lookupForm.isReturnByScript()) {
        getAdditionalHiddenValues().put(UifParameters.RETURN_BY_SCRIPT, "true");
    }

    // if the lookup was called within a dialog then we want to add it to the action's parameters
    String dialogId = lookupForm.getShowDialogId();
    if (StringUtils.isNotBlank(dialogId)) {
        List<Action> actions = ViewLifecycleUtils.getElementsOfTypeDeep(getFooter().getItems(), Action.class);

        for (Action action : actions) {
            action.addActionParameter(UifParameters.DIALOG_ID, dialogId);
        }
    } else {
        dialogId = lookupForm.getActionParamaterValue(UifParameters.DIALOG_ID);
        lookupForm.setShowDialogId(dialogId);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:50,代码来源:LookupView.java


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