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


Java RemoteFieldsHolder类代码示例

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


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

示例1: processAnyRemoteFieldsHolder

import org.kuali.rice.krad.uif.field.RemoteFieldsHolder; //导入依赖的package包/类
/**
 * Iterates through the given items checking for {@code RemotableFieldsHolder}, if found
 * the holder is invoked to retrieved the remotable fields and translate to attribute fields.
 *
 * <p>The translated list is then inserted into the returned list at the position of the holder</p>
 *
 * @param group collection group instance to check for any remotable fields holder
 * @param items list of items to process
 */
public List<Field> processAnyRemoteFieldsHolder(CollectionGroup group, List<? extends Component> items) {
    List<Field> processedItems = new ArrayList<Field>();

    // check for holders and invoke to retrieve the remotable fields and translate
    // translated fields are placed into the processed items list at the position of the holder
    for (Component item : items) {
        if (item instanceof RemoteFieldsHolder) {
            List<InputField> translatedFields = ((RemoteFieldsHolder) item).fetchAndTranslateRemoteFields(group);
            processedItems.addAll(translatedFields);
        } else if (item instanceof Field) {
            processedItems.add((Field) item);
        }
    }

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

示例2: processAnyRemoteFieldsHolder

import org.kuali.rice.krad.uif.field.RemoteFieldsHolder; //导入依赖的package包/类
/**
 * Iterates through the containers configured items checking for <code>RemotableFieldsHolder</code>, if found
 * the holder is invoked to retrieved the remotable fields and translate to attribute fields. The translated list
 * is then inserted into the container item list at the position of the holder
 *
 * @param view view instance containing the container
 * @param model object instance containing the view data
 * @param container container instance to check for any remotable fields holder
 */
protected void processAnyRemoteFieldsHolder(View view, Object model, Container container) {
    List<Component> processedItems = new ArrayList<Component>();

    // check for holders and invoke to retrieve the remotable fields and translate
    // translated fields are placed into the container item list at the position of the holder
    for (Component item : container.getItems()) {
        if (item instanceof RemoteFieldsHolder) {
            List<InputField> translatedFields = ((RemoteFieldsHolder) item).fetchAndTranslateRemoteFields(view,
                    model, container);
            processedItems.addAll(translatedFields);
        } else {
            processedItems.add(item);
        }
    }

    // updated container items
    container.setItems(processedItems);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:28,代码来源:ViewHelperServiceImpl.java

示例3: processAnyRemoteFieldsHolder

import org.kuali.rice.krad.uif.field.RemoteFieldsHolder; //导入依赖的package包/类
/**
 * Iterates through the given items checking for {@code RemotableFieldsHolder}, if found
 * the holder is invoked to retrieved the remotable fields and translate to attribute fields. The translated list
 * is then inserted into the returned list at the position of the holder
 *
 * @param view view instance containing the container
 * @param model object instance containing the view data
 * @param group collection group instance to check for any remotable fields holder
 * @param items list of items to process
 */
protected List<Field> processAnyRemoteFieldsHolder(View view, Object model, CollectionGroup group,
        List<? extends Component> items) {
    List<Field> processedItems = new ArrayList<Field>();

    // check for holders and invoke to retrieve the remotable fields and translate
    // translated fields are placed into the processed items list at the position of the holder
    for (Component item : items) {
        if (item instanceof RemoteFieldsHolder) {
            List<InputField> translatedFields = ((RemoteFieldsHolder) item).fetchAndTranslateRemoteFields(view,
                    model, group);
            processedItems.addAll(translatedFields);
        } else {
            processedItems.add((Field) item);
        }
    }

    return processedItems;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:29,代码来源:CollectionGroupBuilder.java

示例4: performLifecycleTask

import org.kuali.rice.krad.uif.field.RemoteFieldsHolder; //导入依赖的package包/类
/**
 * Invoke custom initialization based on the view helper.
 * 
 * {@inheritDoc}
 */
@Override
protected void performLifecycleTask() {
    Container container = (Container) getElementState().getElement();
    
    if (!container.isProcessRemoteFieldHolders()) {
        return;
    }
    
    List<Component> processedItems = new ArrayList<Component>();

    // check for holders and invoke to retrieve the remotable fields and translate
    // translated fields are placed into the container item list at the position of the holder
    for (Component item : container.getItems()) {
        if (item instanceof RemoteFieldsHolder) {
            List<InputField> translatedFields = ((RemoteFieldsHolder) item)
                    .fetchAndTranslateRemoteFields(container);
            processedItems.addAll(translatedFields);
        } else {
            processedItems.add(item);
        }
    }

    // updated container items
    container.setItems(processedItems);

    
    // invoke hook point for adding components through code
    ViewLifecycle.getHelper().addCustomContainerComponents((ViewModel)ViewLifecycle.getModel(),
            (Container) getElementState().getElement());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:36,代码来源:ProcessRemoteFieldsHolderTask.java


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