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 97161

Summary: Modifying page templates, define component "roles"
Product: obsolete Reporter: Gregory Murphy <gjmurphy>
Component: visualwebAssignee: Gregory Murphy <gjmurphy>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Gregory Murphy 2007-03-03 15:09:08 UTC
Components in third-party component libraries may depend on a special page, head
or form component class, defined by their component library. These top-level
components are often used to inject resources like JavaScript or CSS into the
rendered HTML. There are also other roles assumed by components (for example an
image component being used to encode a URL to an image that is dragged onto the
designer) which the user might want to assign to a component from a different
component library.

Currently, Visual Web Pack requires that pages contain the Braveheart/Woodstock
page component. 

At the very least, we should allow users to delete the page, head and form
components and replace them with others from an imported component library. The
user could then use the NB template manager to craft a new page template of
their own liking.

Eventually, we should consider introducing new interfaces to the Design-Time API
to allow components with these roles to be identified unambiguously. We could
also use a "service provider" type of lookup to discover the page, head and form
design beans. This would allow the IDE to offer the user a choice, for example,
of all components that fulfill the "page" role when creating a new page, or when
modifying the current page.

We might also want to consider the notion of a principal component library,
linked to a set of components with roles. Once the user chooses a page
component, it would determine the "principal" component set for that page, which
would help guide the user in selecting additional components.