org.apache.wicket.markup.html.list.ListView.getListItemModel()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.wicket.markup.html.list.ListView.getListItemModel()方法的一些代码示例,展示了ListView.getListItemModel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.getListItemModel()方法的具体详情如下:
包路径:org.apache.wicket.markup.html.list.ListView
类名称:ListView
方法名:getListItemModel

ListView.getListItemModel介绍

[英]Subclasses may provide their own ListItemModel with extended functionality. The default ListItemModel works fine with mostly static lists where index remains valid. In cases where the underlying list changes a lot (many users using the application), it may not longer be appropriate. In that case your own ListItemModel implementation should use an id (e.g. the database' record id) to identify and load the list item model object.
[中]子类可以提供自己的ListItemModel和扩展功能。默认的ListItemModel适用于索引仍然有效的静态列表。在基础列表变化很大的情况下(许多用户使用应用程序),它可能不再合适。在这种情况下,您自己的ListItemModel实现应该使用一个id(例如数据库的记录id)来标识和加载列表项模型对象。

代码示例

代码示例来源:origin: org.apache.wicket/wicket-core

/**
   * Wraps a ListItemModel in a CompoundPropertyModel.
   * 
   * @param model
   * @param index
   * @return a CompoundPropertyModel wrapping a ListItemModel
   */
  @Override
  protected IModel<T> getListItemModel(final IModel<? extends List<T>> model, final int index)
  {
    return new CompoundPropertyModel<T>(super.getListItemModel(model, index));
  }
}

代码示例来源:origin: apache/wicket

/**
   * Wraps a ListItemModel in a CompoundPropertyModel.
   * 
   * @param model
   * @param index
   * @return a CompoundPropertyModel wrapping a ListItemModel
   */
  @Override
  protected IModel<T> getListItemModel(final IModel<? extends List<T>> model, final int index)
  {
    return new CompoundPropertyModel<T>(super.getListItemModel(model, index));
  }
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
   * Wraps a ListItemModel in a BoundCompoundPropertyModel.
   * 
   * @param model
   * @param index
   * @return a BoundCompoundPropertyModel wrapping a ListItemModel
   */
  protected IModel getListItemModel(final IModel model, final int index)
  {
    return new BoundCompoundPropertyModel(super.getListItemModel(model, index));
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
   * Wraps a ListItemModel in a CompoundPropertyModel.
   * 
   * @param model
   * @param index
   * @return a CompoundPropertyModel wrapping a ListItemModel
   */
  @Override
  protected IModel<T> getListItemModel(final IModel<? extends List<T>> model, final int index)
  {
    return new CompoundPropertyModel<T>(super.getListItemModel(model, index));
  }
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Create a new ListItem for list item at index.
 * 
 * @param index
 * @return ListItem
 */
protected ListItem<T> newItem(final int index)
{
  // FIXME 1.5: this method should already include item's model in its definition
  return new ListItem<T>(index, getListItemModel(getModel(), index));
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Create a new ListItem for list item at index.
 * 
 * @param index
 * @return ListItem
 */
protected ListItem newItem(final int index)
{
  return new ListItem(index, getListItemModel(getModel(), index));
}

代码示例来源:origin: org.apache.wicket/wicket-core

item = newItem(index, getListItemModel(getModel(), index));

代码示例来源:origin: apache/wicket

item = newItem(index, getListItemModel(getModel(), index));

相关文章