Load Web Blocks Dynamically

Load Web Blocks Dynamically



I have 5 tabs in my application.

When i click on tab i want to display the content based on the tab.

Each tab content is a web block. I want to dynamically load web block page on tab click.

Could anyone help me how to do that?

The Tabs widget from Webpatterns has an input parameter 'LoadOnClick'

This will solve your case.


Hello Sekar.

If you want to hide a web block, you just put it inside an if widget, which is a blue diamond-shape tool that can be dragged to the screen.

You could implement a tabbed interface by having a CurrentTab variable on the screen, and designing you screen like this:

<tab header 1> <tab header 2>...
<tab body>
    <if (CurrentTab = 1)>
        <web block 1>
    <if (CurrentTab = 2)>
        <web block 2>

A tab header could just be a styled link, and the tab body a container.

Then when clicking in another tab header, you would change the value of the CurrentTab and refresh the tab body.

The Tabs widget that Niels suggested already does these things for you, but just wanted to point out to you that's not the only option.