Modification History:
The idea behind this proposal is to provide functionality for the users to select a Page Layout while creating web pages (HTML, JSP, PHP, Ruby etc). Currently users create a web page (say HTML) using New -> Html. This creates the "boring" empty page with no page layouts. It is up to the users to create their page layouts. Users tend to create Page Layout using external tools like Dream Weaver and import them in to Netbeans. It would be nice if Netbeans could provide some predefined page layouts for the users to select when they create their web pages.
These predefined page layouts templates should follow pure Netbeans Template mechanism. They should be available in the New Web Page Wizard for the Page authors to start with a predefined page layout, such as Head, Footer, Navigation Bar etc, based on Web Patterns . Also the Page Layout Templates could provide "themed" Page Layouts such as
This task should be exactly similar to the current way of creating a Web Page (Ex. New -> JSP). If Page Layout Templates are available (See implementation details, page for details on how to make Page Layouts available to the IDE), then the Template Wizard would provide an additional Panel for the user to select a page Layout for the page being designed. Once the Page Layout is selected te Wizard continues and creates the Web Page from that template.
IDE might bundle some of the Page Layout templates. However, there should be ability for users to provide their own. Providing them must be via Standard mechanism, such as Plugin and XML Layer. Once the plugin is installed the templates are available to the Web project via the Default File System. Project collects the available templates and presents it to the user as a list.
![]() |
The predefined page templates would be specified in the XML layer file as
<filesystem>
<folder name="Templates">
<folder name="PageLayout">
<file name="PageLayout1.jsp" url="/com/sample/pagelayouts/resources/PageLayout1.jsp.template">
<attr name="SystemFileSystem.localizingBundle"
stringvalue="com.sample.pagelayouts.Bundle"/>
<attr name="name" stringvalue="PageLayout1" />
<attr name="icon" urlvalue="nbresloc:/com/sample/pagelayouts/resources/ PageLayout1-icon.jpg" />
<attr name="preview" urlvalue="nbresloc:/com/sample/pagelayouts/resources/
PageLayout1-preview.jpg" />
<attr name="resources" urlvalue="nbresloc:/com/sample/pagelayouts/resources/
PageLayout1-resources.zip" />
<attr name="position" intvalue="10000"/>
<attr name="description" stringvalue="PageLayout1_Desciption"/>
<attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
</file>
</folder> <!-- Page Templates -->
</folder> <!-- Templates -->
</filesystem>
The optional attributes are
Woodstock Components team has proposed additional tab to the "Select Page Layout" wizard panel. The idea is to allow the user to quickly create a custom layout apart from selecting a predefined.
![]() |
![]() |
The following artifacts may be added to the project when a web page is created from a page layout
Since several varieties of user defined Page Layouts can be added to the IDE via plugins, Categories of templates can be presented as a dropdown list. When a category is selected, then the List will be populated with list of available Page Templates for that Category.
Roumen Stobl has an interesting wish for the page layout as he puts in his blog. His wish is the ability to import Page Layouts created in external tool.
Including his wish, we should continue to look in to the following three areas
| pagelayout-custom.png | ![]() |
24712 bytes |
| pagelayout-themes.png | ![]() |
107369 bytes |