This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 113018

Summary: RFE: Allow developers to remove page bean callback methods
Product: obsolete Reporter: rdelaplante <rdelaplante>
Component: visualwebAssignee: Mark Dey <markdey>
Status: NEW ---    
Severity: blocker CC: rdelaplante
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description rdelaplante 2007-08-16 15:53:28 UTC
I often do not need to use the "template" methods created in each page bean : init(), preprocess(), prerender(),
destroy().  When I do need to use them, they are very useful.  The pages that do not use them are forced to have these
methods.  Since page beans extend AbstractPageBean, why doesn't AbstractPageBean provide an empty implementation and let
me override it only if I want to?  My code feels messy with all of these empty methods and I know other VWP developers
who feel the same way. 

Some of the methods, such as init() and destroy() are used to initialize and clean up some of the artifacts such as
dataprovider. If the user deletes these methods, then initialization and clean up won't occur during Faces Lifecycle and
the user will not have a clue on what is going on. 

The solution may be to have a VWP option such as "Allow deletion of Application Model methods" (with proper warning
about artifact misbehaviors etc). Advanced users who are sure about what they are doing can delete these methods after
check and selecting the option.