I have a data structure that I'm struggling to manage efficiently. To tackle this issue, I've decided to leverage Dojo and utilize JSON. You can find the specific structure I'm referring to at the end of this message, so please take a look before proceeding further.
The challenge at hand involves having 3 Selects. The first Select will display the "first level" options (a, b, c), while the second one will show the "second level" choices (aa, ab, etc.) and so on.
Each Select (excluding the first one) should dynamically adjust its contents based on the selection made in the preceding Select.
For instance, if "a" is chosen in the first Select, only "aa, ab, ac" should be visible in the second Select. Subsequently, selecting "ac" in the second Select should reveal "aca, acb, acc".
It's important to note that there are scenarios where there isn't a "third level." In such cases, the third select should either remain hidden or be left empty if handling it becomes too complex.
Now, concerning references: Opting for "d" in the first Select should present "aa, bc, ca" as choices in the second Select. Following this, choosing "cc" in the second Select should display "cca, ccb, ccc" in the third Select. This linkage should not be static; variations in the "c -> cc" subtree should reflect changes in the "d -> cc" subtree.
Now onto the queries:
1) How can I implement this functionality using Dojo? While I would have no trouble doing so with Vanilla JS, incorporating object stores and similar elements has me stumped.
2) How do I integrate References into this intricate structure? I could handle them in a basic JSON scenario, but the complexity of this setup leaves me perplexed.
3) What approach should I take when presenting the structure? Should I represent it as a single JSON object or split it into multiple segments?
Thank you in advance!
a
aa
aaa
aab
ab
aba
ac
aca
acb
acc
b
ba
bb
bc
bca
c
ca
caa
cab
cb
cba
cbb
cc
cca
ccb
ccc
d
<ref to aa subtree>
<ref to bc subtree>
<ref to ca subtree>