Multiple link (buttons) in a table cell

Hi

We would like to show in a browse screen table cell multiple link’s (Buttons) to children edit screens:

some parent property children
fuu edit child 1
edit child 2
bar edit child 3

Is there an easy way to achieve this? We thought we could use the context menu (table action), but they seem to be the same for all rows, which is not applicable to parent - child…

If this leads to an easy solution - showing a popup dialog window would be ok too…

Cheers
Oliver

Hi Oliver,

There is no declarative way to create such links for child entities, but it can be done programmatically:

  • Make sure your Parent entity is loaded in the browser together with the collection of children.
  • Add a column for the children property and define a columnGenerator handler for it.
  • In the generator method, create an appropriate container component (e.g. HBoxLayout) using UiComponents factory and return it from the method.
  • Before returning the layout, create LinkButton components for each instance of Child in the Parent.children collection and add this button to the layout.
  • For each button, add a ClickEvent listener and use ScreenBuilders to show the Child editor with the selected child instance.

Regards,
Konstantin