Hi I have a pretty large component that needs to appear in one of two places in a large form, depending on who's using the form. The dynamic placement I can do pretty easily using delegates. However, I'm struggling with the tabindex of the various input elements in the component. I want them to vary (depending on where the component is actually rendered) so the user can seamlessly tab through this large form, regardless of where this particular component is rendered.
Now, a naive implementation would be to simply have a server side method per tabindex, like <t:select t:id="country" t:model="dummyModel" t:value="country" t:label="message:COUNTRY" tabindex="${countryTabIndex}" /> This will work. However, I have 70+ input elements in this form, and adding 70+ getters like this hurts my brain. Is there some nicer way to do this? I don't think having a single getter with side effects is going to work either (like this: getNextComponentTab() { nextTab ++; return Integer.parseInt(nextTab); } <t:select t:id="country" t:model="dummyModel" t:value="country" t:label="message:COUNTRY" tabindex="${nextComponentTab}" /> Because the getter is called a couple of times during page render, so I'd end up missing numbers in the tab index order - this itself doesn't break the tabbing of course, but it causes an overlap with subsequent elements in following components. If there was some way I could do the arithmetic in the tag itself, e.g. <t:select t:id="country" t:model="dummyModel" t:value="country" t:label="message:COUNTRY" tabindex="${tabIndexStart + 1}" /> Then I'd settle for that, but that isn't possible I don't think. Any ideas greatly appreciated. Denis