by ylockson » Tue Jun 14, 2016 10:37 am
It appears that what you want to achieve is not presently possible unless you make a case for it to work the way you wish. I suppose that you cannot wait until then...
Allow me to suggest the following work-around:
1.Use a Tabless Panel instead of a Tab Panel. You need name to your Tabless Panel.
2.Create as many buttons as you have Tab Forms (in the Tabless Panel) and place them side-by-side above (and outside) the Tabless Panel. Name them tab_button_1, tab_button_2, ..., tab_button_n. (Follow naming instructions carefully and implementation of highlighting and dimming of tab buttons will work as per code below)
3.In the buttons' onAction trigger, activate the following generic/reusable function:
/**
* Perform the element default action.
* @param {JSEvent} event the event that triggered the action
* @param {String} p_tab_name
* @param {Number} p_tab_index
* @private
* @properties={typeid:24,uuid:"3BA568C2-0C47-460F-9A9A-A8C791114BFC"}
*/
function onTabClick(event, p_tab_name, p_tab_index) {
var _index = elements[p_tab_name].tabIndex;
elements['tab_button_' + _index].bgcolor = '#c0c0c0';
elements[p_tab_name].tabIndex = p_tab_index;
elements['tab_button_' + p_tab_index].bgcolor = '#000000';
var _tab_form = elements[p_tab_name].getTabFormNameAt(p_tab_index);
forms[_tab_form].controller.focusFirstField();
}
4. Click on the arrow to the left of each button's onAction trigger and set p_tab_name to the name of you Tabless Panel. You also need to set p_tab_index for each button. For the button that actives the nth Tab Form set p_tab_index = n.
The following are additional benefits to using a Tabless panel (vs. a Tab Panel):
1.It's easy to have tabs of the same size.
2.In Linux smart client deployment, this work-around gives you better control on the look and feel.
3.By intelligently manipulating the visibility of the buttons and their placement, your form may also cater for access control.
Good luck!