How can I embed a browse list into another browse list?
|Date:||15 November 2004|
|Product/Release:||LANSA for the Web|
|Abstract:||Embedding a browse list into another browse list|
|Submitted By:||LANSA Services|
|Last Review:||November 2010|
Is it possible to embed a browse list into another browse list? I'm attempting to set up a visual component dropdown that can be added/updated from a file that can be used inside a browse list. The only way I can do this, though, is to fill the list as a browse list, and there doesn't seem to be a way to add this list to my other list.
There are a number of approaches you can take:
You could use #exec to execute a SSI-called LANSA/Web function to display the "inner" browselist. However, depending on the amount of data, it could run slowly, as depending on how you code this, each "row" or "cell" calls a LANSA/Web function.
The other approach is to build the browselist ahead of time, at the most granular level and condition showing the header/detail level information at the appropriate time.
A visual calendar example:
Picture a classic calendar of 12 months ... with 28-31 days in each month.
You could build a list of 12 rows ... one for each month.
When you display each row, you could display the month name, and then #exec to launch a function to display all the days for that month.
You could build a list of 365/366 rows ... and use RDML ONCONDITIONs in the row-component to only show the month name once, preceding the first day of each month in the year.
You'd achieve the same look & feel in each circumstance. However the second option will run faster, as only one LANSA/Web function is invoked, as opposed to 13 (12 months + 1 mainline) functions invoked in the #exec approach.