In the browse window i have a column which is pointing to a an association. With the entityPicker in the edit window i can chose, that the association window has to be opened as a dialog. How to do the same with this column ?
Hi
<column id="specificationWork" link="true" linkScreenId="SpecificationWork.edit"/>
https://docs.jmix.io/jmix/ui/vcl/components/table.html#link-to-edit-screen
Dear Oleg
Thank you for your try. The solution you offer is not the same behaviour.
You see here the entitypicker which i can customise in the [entity].edit module, but not in the [entity].browse modul. I would like to open here too a DIALOG. How to adapt ?
Best regards
Felix
public class OrdersBrowse extends StandardLookup<Orders>
{
@Autowired
private DataContext dataContext;
@Autowired
private UiComponents uiComponents;
@Autowired
private Metadata metadata;
@Autowired
private Actions actions;
@Subscribe(id = "ordersesDc", target = Target.DATA_CONTAINER)
public void onOrdersesDcItemChange(InstanceContainer.ItemChangeEvent<Orders> event) {
dataContext.commit();
}
@Install(to = "ordersesTable.orderState", subject = "columnGenerator")
private Component ordersesTableOrderStateColumnGenerator(final Orders orders) {
EntityPicker<OrderState> picker = uiComponents.create(EntityPicker.class);
picker.setMetaClass(metadata.getClass(OrderState.class));
picker.setValue( orders.getOrderState() );
picker.setWidth("160px");
Action action = actions.create(EntityLookupAction.ID);
picker.addAction(action);
return picker;
}
}
I did use a generated column.
Now how to set the openMode(DIALOG) ?
Try this:
EntityLookupAction action = (EntityLookupAction) actions.create(EntityLookupAction.ID);
action.setOpenMode(OpenMode.DIALOG);
// ...
1 Like