Generated Files - Web Fragment

Default File Locations

  • src/main/java for Java source code
  • src/test/java for Java source code for testing
  • src/main/resources for message properties
  • src/main/resources/META-INF for configuration files
  • src/main/resources/META-INF/resources for XHTML, CSS and JavaScript files

You can change the default directories by setting generator options.

Web Pages

Modeling File Naming Description
capability [name] Abstract[Name]ManagedBean.java The class is the parent of all managed beans for the given capability. It inherits from AbstractManagedBean.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]Bean.java The class manages the data for the web page and provides event handlers for the user interaction.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanCustomization.java The class manages the rendered and required flags for XHTML components and also the configuration values that are relevant for this web page only.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanNavigationCustomization.java The class manages the navigation targets for the web page. It has some getters that return a relative URL to an XHTML page or an XHTML view name. Its only purpose is to allow the default navigation target to be overwritten in web application projects.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanDevTooltip.java The class provides hard-coded (generated) technical information about model elements that were used for the code generation. The information is going to be displayed as a tooltip for UI components. In project stage ‘Production’ those tooltips are not displayed at all.
capability [name] [Name]FeatureCustomization.java The class provides a mechanism to switch feature toggles on and off when implementing a web application. Switching a feature on or off is not visible in the model but is provided by Java coding in the web application project.
capability [name] [Name]MasterDataBean.java The almost empty class provides a means to cache data at runtime that needs to be accessed by all web pages and is independent from any user session. ‘Note that you need to manually write code to actually cache data.
capability [name] [Name]SessionDataBean.java The almost empty class provides a means to cache data at runtime that needs to be accessed by all web pages within a single user session. ‘Note that you need to manually write code to actually cache data.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanExtendedCustomization.java The class manages the values for some of the XHTML attributes like for instance style and styleClass. The main purpose of this class is not to be able to overwrite the values in web application projects (though this is possible), but to minimize the number of manual changes in XHTML files.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanI.java The interface is implemented by the [Name]Bean.java class. It is needed in case you want to access a managed bean in a web fragment from a managed bean in a different web fragment, without having to have a compile-time dependency from one fragment to another.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]Component.java,
[Name]Container.java

and an inner enum of [Name]Bean.java for the tabs of a <p:tabView>
An enumeration that gets derived from other model information. There are enumerations derived for
- all containers in an XHTML file
- all components in an XHTML file
- all tabs of a <p:tabView>
capability [name] faces-config.xml This class holds information about exception handlers, message properties and self-made JSF components
capability [name] web-fragment.xml This class holds information about servlets, mime types, exception mapping and initialization parameters
view [name]
layout [name]
where this layout is not used inside another layout or view
[name].xhtml
[name]-center-center.xhtml
[name]-center-north.xhtml
[name]-center.xhtml
[name]-dialogs.xhtml
[name]-east.xhtml
[name]-north.xhtml
[name]-overlay.xhtml
[name]-south.xhtml
[name]-west.xhtml
[name]_generated.xhtml
these XHTML files represent the web page and are going to be read through a URL that ends with
[cap.-name]/[name]/[name].xhtml. The file [name]_generated.xhtml holds the actual page content (input fields, buttons, tables, etc.).
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name].css This CSS file is included only in the page that is related to this layout. Its purpose is to individually style a page, being sure that the styling doesn’t affect any other page.
capability [name] [cap.-name]-messages_de.properties
[cap.-name]-messages_en.properties
[cap.-name]-messages.properties
These properties files contain text that is displayed on web pages (labels, messages, titles, …).
ValidationMessages_de.properties
ValidationMessages_en.properties
ValidationMessages.properties
These properties files contain validation messages that are displayed when the validation for an input component fails. Note that there are corresponding classes ValidationMessages_de.java, ValidationMessages_en.java, ValidationMessages.java generated in the web application component. These classes inherit from MultiPropertiesResourceBundle (runtime lib) and make sure that the validation properties files can be all read, even when there are multiple capabilities used in a single web application.

Web Fragment Interfaces

Modeling File Naming Description
enumeration [name]

capability [cap.‑name]
[Name].java

[cap.-Name]Feature.java
[cap.-Name]Capability.java
[cap.-Name]Page.java
An enumeration that corresponds to an enumeration that is available in the model or to an enumeration that gets derived from other model information. There are enumerations derived for
- the capability itself
- all features modeled for a capability
- all URLs for pages in a capability
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanInitializationParameters.java This class holds initialization parameters for the related web page. Those parameters can be set by query parameters in the GET request for the page. Look at Page Initalization to find more information about this.
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]BeanCallback.java This interface declares some methods that are implemented in [Name]Bean.java. The purpose of those methods is to execute business logic as a result of the user clicking on a button or link in a dialog. Look at Messages & Dialogs to find more information about this.

Integration Tests

Modeling File Naming Description
view [name]
layout [name]
where this layout is not used inside another layout or view
[Name]Page.java These classes implement the so-called ‘Page Object Pattern’ for UI tests that are based on Selenium.
view [name]
layout [name]
where this layout is not used inside another layout or view
Abstract[Name]Test.java These classes represent Selenium tests, one test per web page. They contain test methods related to model elements of type display [name], in the order that they appear in a modeled web page. The generator JSF Application creates non-abstract test classes that inherit from these abstract test classes.
test [name] Abstract[Name]Test.java These classes represent Selenium tests, one test per modeled test. They contain test methods for all modeled steps. The generator JSF Application creates non-abstract test classes that inherit from these abstract test classes.

Maven Build

Modeling File Naming Description
capability [name] pom.xml ⇒ This file can be manually modified. Any modifications will be preserved, except for XML comments and manual formatting.
pom_generated.xhtml ⇒ the purely generated pom file, any changes to this file are going to be lost when regenerating