Community
Participate
Working Groups
Build Identifier: if we want to make the menu-structure in snap web-application, now, it support *ONLY* one-level menus. However, we usually need the hierarchy of menus, i think that we can use Snap-ContextPath to decide the hierarchy of menus. for example. Snap-ContextPath:/cat Snap-ContextPath:/cat/cat1 Snap-ContextPath:/cat/cat2 Snap-ContextPath:/dog Snap-ContextPath:/dog/dog1 and in jsp, we can generate the menu-structures with snapsTree attributes. I have a sample codes in http://www.eclipse.org/forums/index.php?t=msg&th=201754&start=0&S=2e545c93991a8f62080721829bd62aa2 Reproducible: Always
Hi, Thanks for raising the issue, I realize it's been here quite a while so just to update yourself. Snaps is no longer a prototype and will be released alongside Virgo 3.0. This Enhancement will be considered for the following release, I think it's a good one to have as it will force Snaps to deal with snaps nested more than one level deep and a generic solution will give people more flexibility beyond nested menus. Chris.
Gary, I've done some work on this and wanted you opinion. I see two options, we either support snaps with more than one path element in their context path as you have suggested or we support nested snaps. So in your case you would attach the cat1 and cat2 snaps to the cat snap as their host making them grandchildren of the top level host. I don't want to support both as there is too much potential for multiple snaps being about to respond to a request and there isn't a logical way to decide which snap would take priority. If we go with the grandchild approach we would place a ban on snaps with more than one path element in their context path. I prefer this approach but wanted to give you the chance to argue with me. Chris.
My vote (FWIW) is also to go with the grandchild approach. Limit snaps to a single path element in their Snap-ContextPath, but allow the snap to attach itself to either a "regular" host or another Snap with the host filters set up.
Note that the snaps user guide refers to grandchildren in the concepts section, so we should probably add a known issue to that guide pointing at this bug.