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

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

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

ListView.getList介绍

[英]Gets the list of items in the listView. This method is final because it is not designed to be overridden. If it were allowed to be overridden, the values returned by getModelObject() and getList() might not coincide.
[中]获取listView中的项列表。此方法是最终方法,因为它不是被重写的。如果允许重写它,则getModelObject()和getList()返回的值可能不一致。

代码示例

代码示例来源:origin: org.wicketstuff/yui

public AbstractYuiMenuItem getMenuItem(int idx)
{
  ListItem item = (ListItem)list.getList().get(idx);
  return item == null ? null : (YuiMenuBarItem)item.getModelObject();
}

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

@Override
public boolean isEnabled()
{
  return item.getIndex() != (getList().size() - 1);
}

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

@Override
public boolean isEnabled()
{
  return item.getIndex() != (getList().size() - 1);
}

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

@Override
  public boolean isEnabled()
  {
    return item.getIndex() != (getList().size() - 1);
  }
};

代码示例来源:origin: org.wicketstuff/yui

public AbstractYuiMenuItem getMenuItem(int idx)
{
  ListItem item = (ListItem)list.getList().get(idx);
  return item == null ? null : (YuiMenuItem)item.getModelObject();
}

代码示例来源:origin: org.wicketstuff/yui

private void addMenuItem(YuiMenuBarItem menuItem)
{
  ArrayList<YuiMenuBarItem> newList = new ArrayList<YuiMenuBarItem>();
  newList.addAll(list.getList());
  newList.add(menuItem);
  list.setList(newList);
}

代码示例来源:origin: com.nitorcreations/wicket-matchers

@Override
protected boolean matchesSafely(ListView<?> item, Description mismatchDescription) {
  List<?> list = item.getList();
  items.describeMismatch(list, mismatchDescription);
  return items.matches(list);
}

代码示例来源:origin: org.wicketstuff/wicketstuff-minis

private CharSequence getListViewBodyMarkup(final ListView listView)
{
  if (listView.getList().isEmpty())
    return "";
  final ListItem listItem = (ListItem)listView.get("0");
  return getBodyMarkup(listItem);
}

代码示例来源:origin: org.wicketstuff/minis

private CharSequence getListViewBodyMarkup(final ListView listView)
{
  if (listView.getList().isEmpty())
    return "";
  final ListItem listItem = (ListItem)listView.get("0");
  return getBodyMarkup(listItem);
}

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

/**
   * @see org.apache.wicket.Component#onBeforeRender()
   */
  protected void onBeforeRender()
  {
    super.onBeforeRender();
    setAutoEnable(false);
    if (getList().indexOf(item.getModelObject()) == (getList().size() - 1))
    {
      setEnabled(false);
    }
  }
};

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

/**
 * assert the model of {@link ListView} use expectedList
 *
 * @param path
 *            path to {@link ListView} component
 * @param expectedList
 *            expected list in the model of {@link ListView}
 * @deprecated use {@link WicketTester#assertComponent(String, Class) combined with
 *             {@link WicketTester#assertModelValue(String, Object)} instead
 */
@Deprecated
public void assertListView(String path, List<?> expectedList)
{
  ListView<?> listView = (ListView<?>)getComponentFromLastRenderedPage(path);
  WicketTesterHelper.assertEquals(expectedList, listView.getList());
}

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

/**
 * assert the model of {@link ListView} use expectedList
 * 
 * @param path
 *            path to {@link ListView} component
 * @param expectedList
 *            expected list in the model of {@link ListView}
 */
public void assertListView(String path, List expectedList)
{
  ListView listView = (ListView)getComponentFromLastRenderedPage(path);
  WicketTesterHelper.assertEquals(expectedList, listView.getList());
}

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

/**
 * assert the model of {@link ListView} use expectedList
 * 
 * @param path
 *            path to {@link ListView} component
 * @param expectedList
 *            expected list in the model of {@link ListView}
 */
public void assertListView(String path, List<?> expectedList)
{
  ListView<?> listView = (ListView<?>)getComponentFromLastRenderedPage(path);
  WicketTesterHelper.assertEquals(expectedList, listView.getList());
}

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

/**
 * Asserts the model of a {@link ListView}.
 * 
 * @param path
 *            path to a {@link ListView} <code>Component</code>
 * @param expectedList
 *            expected <code>List</code> in the model of the given {@link ListView}
 */
public void assertListView(String path, List expectedList)
{
  ListView listView = (ListView)getComponentFromLastRenderedPage(path);
  WicketTesterHelper.assertEquals(expectedList, listView.getList());
}

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

/**
 * Asserts the model of a {@link ListView}.
 * 
 * @param path
 *            path to a {@link ListView} <code>Component</code>
 * @param expectedList
 *            expected <code>List</code> in the model of the given {@link ListView}
 */
@Override
public void assertListView(String path, List<?> expectedList)
{
  ListView<?> listView = (ListView<?>)getComponentFromLastRenderedPage(path);
  WicketTesterHelper.assertEquals(expectedList, listView.getList());
}

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

/**
 * @see org.apache.wicket.markup.html.link.Link#onClick()
 */
@Override
public void onClick()
{
  final int index = item.getIndex();
  if (index != -1)
  {
    addStateChange();
    // Swap items and invalidate listView
    Collections.swap(getList(), index, index - 1);
    ListView.this.removeAll();
  }
}

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

/**
 * @see org.apache.wicket.markup.html.link.Link#onClick()
 */
@Override
public void onClick()
{
  final int index = item.getIndex();
  if (index != -1)
  {
    addStateChange();
    // Swap list items and invalidate listView
    Collections.swap(getList(), index, index + 1);
    ListView.this.removeAll();
  }
}

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

/**
 * @see org.apache.wicket.markup.html.link.Link#onClick()
 */
@Override
public void onClick()
{
  final int index = item.getIndex();
  if (index != -1)
  {
    addStateChange();
    // Swap list items and invalidate listView
    Collections.swap(getList(), index, index + 1);
    ListView.this.removeAll();
  }
}

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

/**
   * @see org.apache.wicket.markup.html.link.Link#onClick()
   */
  @Override
  public void onClick()
  {
    addStateChange();
    item.modelChanging();
    // Remove item and invalidate listView
    getList().remove(item.getIndex());
    ListView.this.modelChanged();
    ListView.this.removeAll();
  }
};

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

/**
   * @see org.apache.wicket.markup.html.link.Link#onClick()
   */
  @Override
  public void onClick()
  {
    addStateChange();
    item.modelChanging();
    // Remove item and invalidate listView
    getList().remove(item.getIndex());
    ListView.this.modelChanged();
    ListView.this.removeAll();
  }
};

相关文章