The javascript library that renders the tabs gives you access to the tab information, through the variable GRAILSUI
For example, the following gsp would always display the first tab on save.
<gui:tabView id="myTabs">
<gui:tab label="Basic" active="true">
</gui:tab>
<gui:tab label="Firms">
</gui:tab>
</gui:tabView>
We can now access the tabs in custom javascript by using
GRAILSUI.myTabs.get('activeIndex')
all that's left is to save a hidden field, and change the tab 'active' definitions
No comments:
Post a Comment