Clientside Tabbing With Web Blocks

Clientside Tabbing With Web Blocks

We have an application where a screen is navigated using Clientside Javascript Tabbing.  Each tab has a web block with its own Preparation Action.  On loading the screen each web block preparation in each of the tabs is executed.  Due to this, the screen is very slow to render.  Since only the current active tab is displayed, it seems wasteful to also do all of the other tab preparation actions up front rather than waiting until they are needed. 

Is there a way to delay the execution of a tab's web block (i.e its preparation action) until its tab is actually selected?  Also, if a user changes the value of a database field in one tab that is also displayed on another tab, can the other tab's web block be refreshed when the user selects it so that the value for the database field is consistently displayed?

I tried the following approach which didn't work.  At the top of each Preparation Action I placed an 'If' widget which always branched immediately to an 'End', but on the unexecuted branch of the 'If' are all of the required queries for the selected tab.  Then whenever a tab was selected I did a refresh on all of the queries in the Preparation Action. The query refresh and Ajax screen refresh do not populate the Edit table.   It appears that this approach prevents OS from properly binding an edit table to its record source in the Preparation query.


If you put an IF element (always true to an End element) in the preparation and the query in the false branch, that query is not executed and the data never retrieved from the database.

You can try follow this post as the there is an how-to on the Client-Side Tabs and how to execute some logic on tab activation.

If you're not getting it to work feel free to come back and tell us :)

Not executing the queries in the preparation is exactly the point.  I wanted the queries there only to allow the refresh to use them to get the data whenever the tab is selected, and not to execute them on loading the screen.  Apparently, not only do the queries not execute (which is what I want) but also the bindings to the edit tables are  bypassed.  The refresh also doesn't seem to do the edit table bindings. 

I could probably remove the queries from the preparations.  Instead of a refresh action, put the queries into 'GetData' screen actions just the way they would go into the preparations.  Then bind the 'GetData' action queries to the edit tables.  This way the 'GetData' action can be called whenever the tab is activated (via the javascript/button click hack).  I would try this approach, but it means doing a lot of recoding to redirect references to the edit tables and their fields (there are a lot of them).  In the end this what I will probably have to do.  This is an instance where I think doing a post-back on the tabs (i.e not using the clientside tabbing) would be just as fast and would be alot cleaner and less cluttered.