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