Recursive Web Blocks

On our radar

This idea was stumbled upon trying to generate a tree list from dynamic source (table/aggregate, JSON etc). Due to dynamic source, the depth of the list is unknown until run time, so hard-coded solution is not possible.

Logically this leads to using nested web blocks, taking the current object and listing its children, recursively so that each child then also displays its children. So on, so forth.

Despite the data source in this case always being finite (hence, recursivity will not form an infinite loop), it is still not possible to induce web block recursivity in this way.

Proposal: Allow Web Blocks to be recursive, detecting whether infinite looping will occur or not.

Created on 11 Jul
Comments (1)

Changed the category to Frontend and the status to

On our radar

Hi David,

That's a great idea! Although we do not have short term plans for it we're adding this to our radar so we can keep an eye on it.

In the meantime, a better approach might be to do the widget in client side, there are several tree components in the forge that you can inspire yourself on. And since trees are usually very interactive (e.g. expand/collapse), making this with some javascript will provide a better experience for end-users.

Thanks a lot for your idea, we'll certainly take a look into it in the future.