本文整理汇总了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;
}
}
示例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);
}
}