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

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

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

ListView.getReuseItems介绍

[英]If true re-rendering the list view is more efficient if the windows doesn't get changed at all or if it gets scrolled (compared to paging). But if you modify the listView model object, then you must manually call listView.removeAll() in order to rebuild the ListItems. If you nest a ListView in a Form, ALLWAYS set this property to true, as otherwise validation will not work properly.
[中]如果为true,则如果窗口根本没有更改或滚动(与分页相比),则重新呈现列表视图更有效。但如果修改listView模型对象,则必须手动调用listView。removeAll()以重新生成ListItems。如果在表单中嵌套ListView,则始终将此属性设置为true,否则验证将无法正常工作。

代码示例

代码示例来源:origin: OrienteerBAP/Orienteer

public boolean getReuseItems()
{
  return listView.getReuseItems();
}

代码示例来源:origin: de.agilecoders.wicket/wicket-bootstrap-core

/**
   * The logic that should be executed at {@link org.apache.wicket.Component#onConfigure()}
   *
   * @param component The list item
   * @param cssClasses The CSS classes to add to the component
   */
  public static void onConfigure(Component component, String... cssClasses) {
    // re-add the divider if the parent is a ListView
    // that doesn't reuse its items
    ListView listView = component.findParent(ListView.class);
    if (listView != null && !listView.getReuseItems()) {
      component.getParent().add(new CssClassNameAppender(cssClasses));
    }
  }
}

代码示例来源:origin: de.agilecoders.wicket/wicket-bootstrap-core

/**
 * The logic that should be executed at {@link org.apache.wicket.Component#onInitialize()}
 *
 * @param component The list item
 * @param cssClasses The CSS classes to add to the component
 */
public static void onInitialize(Component component, String... cssClasses) {
  // add the divider if the parent is not a ListView
  // or a ListView that reuses its items
  ListView listView = component.findParent(ListView.class);
  if (listView != null) {
    if (listView.getReuseItems()) {
      component.getParent().add(new CssClassNameAppender(cssClasses));
    }
  } else {
    component.getParent().add(new CssClassNameAppender(cssClasses));
  }
}

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

if (size > 0)
  if (getReuseItems())

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

if (size > 0)
  if (getReuseItems())

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

if (size > 0)
  if (getReuseItems())

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

if (size > 0)
  if (getReuseItems())

相关文章