F7已选列表控件的使用

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:2

F7已选列表控件的使用

1、进入页面后,控件选择单据列表和F7已选列表 ![image.webp](/download/01009698952c803a4a5dbf1cf2e97bdd6179.webp) 2、处理页面布局和列表展示 ![image.webp](/download/01007924ff93617942cb99689a20a704a869.webp) 3、添加事件处理插件 public class F7SelectListPlugin extends AbstractListPlugin { private static final Log logger = LogFactory.getLog(F7SelectListPlugin.class); private static final String BILLLISTAP = "billlistap"; private static final String SELECTED_SOLUTION = "f7selectedlistap"; @Override public void registerListener(EventObject e) { super.registerListener(e); // 配置列表与F7已选列表互动增删监听 BillList billList = this.getControl(BILLLISTAP); F7SelectedList f7SelectedList = getControl(SELECTED_SOLUTION); billList.addListRowClickListener(new ListRowClickListener() { public void listRowDoubleClick(ListRowClickEvent arg0) { throw new UnsupportedOperationException(); } public void listRowClick(ListRowClickEvent listRowClickEvent) { BillList source = (BillList) listRowClickEvent.getSource(); f7SelectedList.addItems(getF7SelectedItems(source.getSelectedRows())); } }); billList.addListRowSelectAllListeners((event) -> { BillList source = (BillList)event.getSource(); f7SelectedList.addItems(getF7SelectedItems(source.getSelectedRows())); }); billList.addClearSelectionListener((event) -> { f7SelectedList.addItems(new ArrayList<>(0)); }); f7SelectedList.addF7SelectedListRemoveListener((f7SelectedListRemoveEvent) -> { billList.restoreSelection(f7SelectedListRemoveEvent.getParam().toString()); }); f7SelectedList.addF7SelectedListRemoveAllListener((f7SelectedListRemoveEvent) -> { billList.clearSelection(); }); } /** * 将列表选择选项转化成F7内容项 */ private List<ValueTextItem> getF7SelectedItems(ListSelectedRowCollection selectedRows) { ArrayList<ValueTextItem> valueTextItems = new ArrayList<>(); for (ListSelectedRow row : selectedRows) { valueTextItems.add(new ValueTextItem(row.toString(), row.getBillNo())); } return valueTextItems; } }   4、成果展示 ![image.webp](/download/01004494579ac45e41f482b5fd84b43b806f.webp)

F7选择列表控件的使用.docx

F7已选列表控件的使用

1、进入页面后,控件选择单据列表和F7已选列表![image.webp](/download/01009698952c803a4a5dbf1cf2e97bdd6179.webp)2、处理页面布局和列表...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息