[英]how to get the selected items in DualListField?
i don't have any idea on how to get the selected items in a DualListField. 我对如何在DualListField中获取选定的项目一无所知。 Can somebody help me.
有人可以帮我吗。 so here's my code on DualListField.
所以这是我在DualListField上的代码。 And I want txtCat to be the container of the selected items aside from the TextCell.
我希望txtCat成为TextCell之外的选定项目的容器。 And also I want the selected item to be converted on its IDCategory
我也希望所选项目在其IDCategory上进行转换
final DualListField<Category, String> field = new DualListField<Category, String>(category, toCategory, catProp.strName(), txCell);
field.addValidator(new EmptyValidator<List<Category>>());
field.setEnableDnd(true);
field.setMode(Mode.INSERT);
vlc.add(new FieldLabel(field, "Categories"), new VerticalLayoutData(1, -1, new Margins(10)));
txtCat = new TextField();
txtCat.setEmptyText("Value");
txtCat.addFocusHandler(new FocusEvent.FocusHandler() {
@Override
public void onFocus(FocusEvent event) {
field.getFromStore();
}
});
vlc.add(new FieldLabel(txtCat, "Chosen Categories"), new VerticalLayoutData(-18, -1, new Margins(10)));
In latest GXT3 version DualListField , You could get the selected items in ToView part through field.getValue() method. 在最新的GXT3版本DualListField中 ,您可以通过field.getValue()方法在ToView部件中获取选定的项。 You get all the data in ToView as follows.
您可以按以下方式在ToView中获取所有数据。 field.getToView() .getStore().getAll() .
field.getToView(). getStore()。getAll()。 hth
心连心
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.