We construct forms from panels and each panel has a set tabindex. To keep this functionality consistent through the form we have implemented the following (credit where credit is due: not my work, one of my compatriots).
---- *** Abstract class AthenaPage implements TabIndex (getTabIndex(),hasTabIndex(),resetTabIndex(),setHasTabIndex() ) *** The AthenaPage implements TabIndex with the help of a DefaultTabIndexImpl (strategy) *** When a page has tab indexing, a call to setHasTabIndex(true) will ensure tab indexing is implemented on the page (as well resetTabIndex() will be called in onAfterRender() ). *** All components in com.vegas.ui.wicket.form have tabindex capabilities. Basically all comonents override onComonentTag() and set the tabindex via an AttributeModifier if a call to the components setEnabledTabIndex(true) was called. By default the page the component lives on will used as as PropertyModel. The getTabIndex(tabindex) will be called and the tabindex attribute will be modified upon render. *** The nice trick is that each panel can define what order the components are in by simply setting tabindex=1, tabindex=3 as normal. The TabIndex stragey takes into account the templates tabindex attribute and knows the over all tabindex for the entire page so the new tabindex value for the component is in sync. ---- Does anyone see any potential issues with the above, or are we re-inventing the wheel in any portion of the above? In case anyone is interested, the canonical use case for us consists of an order for multiple items, each of which requires differing user data: hotel room: guest names & ages tickets to a show: name of person picking up the tickets, whether to print or hold at will-call another hotel room etc. Thank you, Scott -- Scott Swank reformed mathematician ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user