Recursive Web Blocks
507
Views
6
Comments
On our RadarOn our Radar
Frontend (App Interfaces)

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.

Changed the category to
Frontend
and the status to
On our RadarOn 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.

Cheers,

Tiago

Please do consider this feature. I don't want to rely on javascript just to create a treeview. 

I understand the need to protect developers from making the mistake of ending up with an infinite loop, but that's what TrueChange warnings are for. Recursiveness (is that a word?) is such a powerful tool in our developer toolbox, this should really be allowed.

This is a great idea. I can think of hundreds of scenarios where recursive web blocks would be a great solution, the only one for some. 

Merged this idea with 'Recurring Blocks' (created on 13 Dec 2023 20:07:23 by Rudi Louw)

Hi,

Recurring Blocks have always been on my list but I do not see anything about it in the ideas section.

It would be great to be able to recur blocks in the same fashion as you would recur a function. Implementing Hierarchical structures with the focus on re-usability is just one use case, but implement a reporting structure with a dynamic amount of pages can then also be done using this quite easily (think Crystal Reports or Jasper Report Viewer type designs).

So now, I create a hierarchical view of about 10 or 15 blocks which are exactly the same in every way and if an event takes place on the bottom node, I have to send that event all the the back up to the origin block just so that my calling screen can access it.

The key word for this idea is "Reusability"

Hi,

Please search first ideas, before posting your idea.

I will merge your idea.

Regards,

Daniel