本文整理汇总了Java中org.apache.wicket.markup.repeater.util.ModelIteratorAdapter类的典型用法代码示例。如果您正苦于以下问题:Java ModelIteratorAdapter类的具体用法?Java ModelIteratorAdapter怎么用?Java ModelIteratorAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelIteratorAdapter类属于org.apache.wicket.markup.repeater.util包,在下文中一共展示了ModelIteratorAdapter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getItemModels
import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter; //导入依赖的package包/类
@Override
protected Iterator<IModel<Var>> getItemModels() {
model.detach(); // force reload
ScriptContext context = model.getObject();
if (context == null) {
return Collections.emptyIterator();
}
ScriptValueMap map = model.getObject().getVars();
List<Var> list = new ArrayList<>(map.size());
for (String name : map.keySet()) {
list.add(new Var(name, map.get(name)));
}
return new ModelIteratorAdapter<Var>(list) {
@Override
protected IModel<Var> model(Var var) {
return new VarModel(model.getSessionId(), var.getName());
}
};
}
开发者ID:intuit,项目名称:karate,代码行数:20,代码来源:VarsRefreshingView.java
示例2: getItemModels
import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter; //导入依赖的package包/类
/**
* Note: if you wish to override this, and overriding {@link #getModel(T)} is not enough, you're better off extending {@link RefreshingView} directly.
*/
@Override
protected final Iterator<IModel<T>> getItemModels() {
C collection = getModelObject();
if (collection == null) {
return Collections.emptyIterator();
}
Collection<T> collectionWithoutTypeWildcard = Collections.unmodifiableCollection(getModelObject());
return new ModelIteratorAdapter<T>(collectionWithoutTypeWildcard.iterator()) {
@Override
protected IModel<T> model(T object) {
return AbstractGenericCollectionView.this.getItemModel(object);
}
};
}
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:19,代码来源:AbstractGenericCollectionView.java
示例3: getItemModels
import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter; //导入依赖的package包/类
@Override
protected Iterator<IModel<FeatureState>> getItemModels()
{
List<FeatureState> featureStates = getModelObject().getFeatureStates();
return new ModelIteratorAdapter<FeatureState>(
featureStates)
{
@Override
protected IModel<FeatureState> model(FeatureState aObject)
{
return FeatureStateModel.of(getModel(), aObject);
}
};
}
开发者ID:webanno,项目名称:webanno,代码行数:16,代码来源:AnnotationFeatureForm.java
注:本文中的org.apache.wicket.markup.repeater.util.ModelIteratorAdapter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论