[5.49] Keep selection in cascading elements
TerminéeIntroduced in VertiGIS Studio Workflow 5.49
Let's say I have two dependent list boxes, the first one with items A and B. A has subitems 1, 2 and 3, and B has subitems 1, 2 and 4:

If I select A+1, and then B, I would like to keep 1 selected.
Obviously, this is only relevant for subitems that are in both A and B, so if for Example I select A+3, then B, no items will be selected. When going back to A now, 3 can remain unselected.
-
I think you should be able to do that manually through a subworkflow, but I'm reluctant to make that some kind of built-in behaviour.
The general expectation is that if you change the depended-upon selection then you will need to re-select in the dependent.
0 -
Yes, I can do it, but it's not straightforward: When entering the ‘Options’ subworkflow, the previous items are already removed, so I need to listen to the Change event, and store the selection in a separate variable.
I'm not so sure about the general expectation. Let's say that in my example I have selected A and 1. Then I extend the selection in the first box to A and B. I would expect the second box to contain 1, 2, 3 and 4 with 1 still selected.
This option would have to be optional of course.
0 -
The concept of depends on a multi-select element is an interesting one. I can see the argument for persisting the secondary selection there.
In a single-select situation, though, my concern is that A.1 and B.1 might not necessarily indicate the same secondary selection, even if they have the same value. Then again, since as you said this would be optional, the workflow author would know that the selections are equivalent when enabling this feature.
0 -
Berend Veldkamp Just to give an update - I'm working on this and making reasonable progress. There are two sticking points:
- If the value was an object type, like a feature it'd be more complicated then to detect if a value is equivalent to the previous selection. For now, I'm using simple equality which will work for primitive types. I hope that's the most common use case.
- For an Auto Complete, it's not immediately obvious if the previous selection is still valid. While I could retain the value, it could be misleading as it's maybe no longer valid. I'm starting to think we need to exclude the Auto Complete from this behaviour.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires