WebFrameworkSupport API Changes
By Geertjan on Jan 02, 2008
The other enhancements were related to or caused by the changed status:
- WebFrameworkProvider.getConfigurationPanel() and FrameworkConfigurationPanel were deprecated and replaced with WebModuleExtender. The main reason for this change was the unclear lifecycle of FrameworkConfigurationPanel. Imagine calling WebFrameworkProvider.getConfigurationPanel() twice: what should the method return on the second call? The panel returned by the first call? A new panel? The WebModuleExtender solves this problem.
- WebFrameworkProvider.extend() was deprecated and replaced with WebModuleExtender.extend(). Again, the reason was the unclear lifecycle.
- The API is not linked to the wizard API anymore (FrameworkConfigurationPanel used to extend WizardDescriptor.Panel). This fixes a design flaw in the API which made it hard to extend a web module from the project customizer, where there is no wizard available.
- ExtenderController was introduced to allow a framework implementor to set error messages for the configuration UI.
I want to make use of the changed API soon and, when I do, I will report here on my findings. To see these changes in action already, should you need to do so, see the Struts and JSF framework support classes in the NetBeans sources, which have been upgraded. However, in order to avoid losing history, they weren't renamed. So, even though the Struts class should be called StrutsWebModuleExtender, it is still called StrutsConfigurationPanel.
Of course, the first and best place to read about NetBeans APIs is the related Javadoc:
Thanks to NetBeans engineer Andei Badea for providing all this information.
Update: Go here to see an implementation of the new 6.0 version of this API, as outlined above.