0
votes

I have a form that has 4 fields

KEY LEVEL1 LEVEL2 LEVEL3

The key is the type of document, for our purposes say Level1,Level2,Level3.

If the key in a document is LEVEL1 then there is some value in LEVEL1, say "App 1".

If the key in a document is LEVEL2, then the value in LEVEL1 must be one of the values in the Level1 document. and then LEVEL2 is something like TITLE1.

Finally if there is document where the key is LEVEL3, then that must have valid values in LEVEL1 and LEVEL2, and then something like "Page3" in LEVEL3.

So this is an obvious tree structure.

I am trying to construct a categorized view (in Xpages but I think I have to start with a categorized view in LN) that would look like this:

Where the user could open or close the twisty to collapse categories, OR click on the entry to open that document. So if a user clicked on TITL1 they would go to the TITLE1 document, and if they clicked on TITLE2 they would go to that document and so on.

For the life of me I cannot figure this out. Maybe it isn't possible.

Any help would be greatly appreciated.

Bryan

Thanks for all the suggestions.

I tried to make a notes view with the suggestions, but it just didn't work. I thought better to not think in classic notes development and instead to think in Xpages terms. Seemed like what I was looking for was nested repeats.

So that is what I did. The result looks like this:

enter image description here

I only want the user to add an entry, which is why I have a "+" on the last entry. I will allow the user to eventually delete entries and to move them around.

Any suggestions for improvements on the UI are welcome.

1
I have an app in which a View consists of some documents and their response documents, which makes the primary documents look like categories.Eric McCormick
Is there always no more than one single document in a category?D.Bugger

1 Answers

5
votes

Try this:

tmpLevel := @trim(LEVEL1:LEVEL2:LEVEL3:LEVEL4);
@Implode(tmpLevel;"\\");

for your category. It will get you relatively close to what you want. It will list the level document separately from the category. You might want to revisit your interaction design, to have the twistie and the labels behave differently smells like user confusion. Anyway, the Notes style categorized views aren't common in web, you might look for alternative layouts.

Let us know how it goes!