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 - RFE: Allow developers to remove page bean callback methods
Summary: RFE: Allow developers to remove page bean callback methods
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 2 votes (vote)
Assignee: Mark Dey
Depends on:
Reported: 2007-08-16 15:53 UTC by rdelaplante
Modified: 2011-09-19 21:17 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.