collection of nested views

Started by Mate, June 07, 2024, 19:50:03 PM

Previous topic - Next topic

Mate

I have a top-level view with a bunch of nested views within it. How do I get the collection of nested views?

var selected = $(selection);
selected.find("view").each(function(v) {
      debug ? console.log("found: " + v.name):true;      
   });

when selection is a view, this does not list the nested views. I also tried:
selected.find("archimate-diagram-model")
with no luck  :(

I am likely doing something basic incorrectly. Any pointers are much appreciated. Thanks in advance.

Phil Beauvoir

Hi, I'm not sure what you mean by "nested views". Do you mean view references (shortcuts)? If so, try using "diagram-model-reference":

selection.find("diagram-model-reference").each(function(v) {
    console.log(v);     
});
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Mate

 :-[ yep, that is what I meant, Phill. Thank you for helping me learn the correct terminology as well for the code snippet. It works like a charm.