Selection removal in nested list view

0
Hello all I have a problem I can’t find a solution to with nexted list views. I am listening to the selection with a data view. I want to be able to select an item in the nested level 3 and only have that selected in the whole container (all nexted levels). When I click a new item in level 3 it deselects all other level 3 selections. Is this possible somehow? Its not just a styling issue, I can remove the selection with CSS. Looking forward to any pointers. KR Ron
asked
2 answers
1

Here’s how I’d approach this use case:

  • Add a non-persistable helper entity wrapping the page
  • Add a reference from the helper entity to the entity used in level 3 of your diagram
  • Instead of using the “listen to” functionality in the list view:
    • Set up the “detail” data view on the page to pull the level 3 item over association
    • On click of the level 3 list view item, run a nanoflow that takes your level 3 item and the helper object as inputs. The nanoflow should set the association between the 2 objects
  • The last step is styling. I think you might be able to get away with using the ‘mx-focus’ class or ‘:focus’ pseudo-selector to highlight the selected item. Otherwise, you might need a widget or JS action that toggles a class on the list item.
answered
0

Thanks Eric, that worked perfect. 

Just the styling is now an issue. When I style the ‘mx-focus’ it works but only until a different element is clicked (eg. Textbox). Then the class dissapears. The ‘:focus’ is not avaliable on list views as far as I tell.

I did think of using an ‘IsSelected’ attribut in the domain model but dont want to store this info in database because other users might be working on the same object.

answered