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

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

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

ListView.setList介绍

[英]Sets the model as the provided list and removes all children, so that the next render will be using the contents of the model.
[中]将模型设置为提供的列表并删除所有子项,以便下一次渲染将使用模型的内容。

代码示例

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

public void addMenuItem(AbstractYuiMenuItem menuItem)
{
  items.add(menuItem);
  list.setList(items);
}

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

public void removeMenuItem(int idx)
{
  AbstractYuiMenuItem item = items.get(idx);
  items.remove(item);
  list.setList(items);
}

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

public YuiMenu addMenu()
{
  YuiMenuGroupMenu subMenu = new YuiMenuGroupMenu(false, false);
  menus.add(subMenu);
  list.setList(menus);
  return subMenu;
}

代码示例来源:origin: org.openengsb.ui/org.openengsb.ui.common

public void reloadList(Map<String, Object> properties) {
  List<MapEntry<String, Object>> entryList = transformToEntryList(properties);
  Collections.sort(entryList, new Comparator<MapEntry<String, Object>>() {
    @Override
    public int compare(MapEntry<String, Object> o1, MapEntry<String, Object> o2) {
      return o1.getKey().compareTo(o2.getKey());
    }
  });
  propertiesList.setList(entryList);
}

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

public YuiMenu addMenu(IModel label)
{
  YuiMenuGroupMenu subMenu = new YuiMenuGroupMenu(label, menus.size() == 0, false);
  menus.add(subMenu);
  list.setList(menus);
  return subMenu;
}

代码示例来源: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: de.tudarmstadt.ukp.inception.app/inception-ui-kb

public SearchResultGroup(String aId, String aMarkupId, MarkupContainer aMarkupProvider,
    List<String> aResultList)
  {
    super(aId, aMarkupId, aMarkupProvider);
    ListView<String> statementList = new ListView<String>("results")
    {
      private static final long serialVersionUID = 5811425707843441458L;
      @Override protected void populateItem(ListItem<String> aItem)
      {
        aItem.add(
          new Label("sentence", aItem.getModelObject())
            .setEscapeModelStrings(false));
      }
    };
    statementList.setList(aResultList);
    add(statementList);
  }
}

代码示例来源:origin: inception-project/inception

public SearchResultGroup(String aId, String aMarkupId, MarkupContainer aMarkupProvider,
    List<String> aResultList)
  {
    super(aId, aMarkupId, aMarkupProvider);
    ListView<String> statementList = new ListView<String>("results")
    {
      private static final long serialVersionUID = 5811425707843441458L;
      @Override protected void populateItem(ListItem<String> aItem)
      {
        aItem.add(
          new Label("sentence", aItem.getModelObject())
            .setEscapeModelStrings(false));
      }
    };
    statementList.setList(aResultList);
    add(statementList);
  }
}

代码示例来源:origin: org.opensingular/wicket-utils

@Override
protected void onInitialize() {
  super.onInitialize();
  add(dropdownButton.add(dropdownButtonLabel.setDefaultModel(dropdownLabel)));
  add(dropdownMenu.add(buttons));
  buttons.setList(buttonsMetadata.getObject());
  if (pullRight.getObject()) {
    dropdownMenu.add(Shortcuts.$b.attrAppender("class", "pull-right", " "));
  }
}

代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-ui-kb

overviewList.setList(
  searchResults.getObject().stream().map(res -> res.getDocumentTitle()).distinct()
    .collect(Collectors.toList()));

代码示例来源:origin: org.opensingular/singular-wicket-utils

@Override
protected void onInitialize() {
  super.onInitialize();
  add(dropdownButton.add(dropdownButtonLabel.setDefaultModel(dropdownLabel)));
  add(dropdownMenu.add(buttons));
  buttons.setList(buttonsMetadata.getObject());
  if (pullRight.getObject()) {
    dropdownMenu.add(Shortcuts.$b.attrAppender("class", "pull-right", " "));
  }
}

代码示例来源:origin: inception-project/inception

overviewList.setList(
  searchResults.getObject().stream().map(res -> res.getDocumentTitle()).distinct()
    .collect(Collectors.toList()));

相关文章