projectwonder/wonder — pull request #79 by lbane (2011-12-15 18:09:36+00:00)
Title: Handle dynamic AjaxTabbedPanel IDs

A NullPointerException is thrown, when the AjaxTabbedPanel ID is not a constant string and there is no ID assigned directly to a AjaxTabbedPanelTab.
(Reason: In AjaxTabbedPanel.findTabs the id binding is called with id.valueInComponent(null). In a WOKeyValueAssociation valueInComponent() uses the component parameter without checking for a null value and therefore throwing the exception.)

The patch introduces two new associations, parentId and tabNumber, in AjaxTabbedPanelTab to replace the constant value association "new WOConstantValueAssociation(id.valueInComponent(null) + "_pane_" + tabs.count())". The tab id is then made by concatenating the panel id and the tab number at the time of response generation.