You have two solutions to create tabs in RASD. Both have some pros and cons.
Each PAGE is one tab. Each tab can be represented by many blocks.
Solution 1:
In one page you prepare all tabs. And when they are prepared chosen one is visible others are hidden.
Pros:
- Actions on changing tabs on browser is faster. You have no interaction with server (only ajax calls).
Cons:
- Slower loading of the page, because all tabs should be filed with data.
- When changing data on hidden tabs can happen that the data is changed in the server meanvile. You have to use data locking that this will not happen.
Solution 2:
You divide tabs on pages. So each tab is different page. Here you don't have to hide tabs because they are not send to browser you just have to show links in hidden tabs menu.
Pros:
- Faster loading of the data
- Small chance to change old data
Cons:
- Little slower feeling when changing tabs.
Samples:
Solution 1:
Create custom tabs function where each block is its own tab. If you have more blocks in one tab it is better to take solution 2. In example blocks are named B1, B2, .... Here all blocks are on one page (default is 0).
You have two solutions to create tabs in RASD. Both have some pros and cons.
Each PAGE is one tab. Each tab can be represented by many blocks.
Solution 1:
In one page you prepare all tabs. And when they are prepared chosen one is visible others are hidden.
Pros:
- Actions on changing tabs on browser is faster. You have no interaction with server (only ajax calls).
Cons:
- Slower loading of the page, because all tabs should be filed with data.
- When changing data on hidden tabs can happen that the data is changed in the server meanvile. You have to use data locking that this will not happen.
Solution 2:
You divide tabs on pages. So each tab is different page. Here you don't have to hide tabs because they are not send to browser you just have to show links in hidden tabs menu.
Pros:
- Faster loading of the data
- Small chance to change old data
Cons:
- Little slower feeling when changing tabs.
Samples:
Solution 1:
Create custom tabs function where each block is its own tab. If you have more blocks in one tab it is better to take solution 2. In example blocks are named B1, B2, .... Here all blocks are on one page (default is 0).
Create block (first on page like B0) and call tabs function in Block name.
Add javascript into FORM_JS. Where DEMO_TABLS is the name of your program.
Sample is DEMO_TABS
Solution 2:
Create custom tabs function where you have all your tabs and links. Don't forget to add blocks on different pages. In example we have 4 pages...
Call tab function in front PRE_UI BLOCK trigger on your first block in program. This will show the tabs.
In last presented block POST_UI you must close the tabs.
Sample is DEMO_TABS_PAGES
You can find samples on http://bit.ly/RasdNo1 in samples.
Last edit: Domen Dolar 2022-03-21