Configuration - Web Fragment

Location of generated Files

In a Virtual Developer Cloud Connector, every of the following groups of files (so-called virtual projects) can be mapped to a separate Eclipse project or to a directory. By providing more than one virtual project you have the freedom to organize the generated code in the way you want.

Groups of Files (Virtual Projects) Included File Types
JSF Web Fragment Java Classes, XML Configuration Files, XHTML Files, Properties Files
JSF Web Fragment Interfaces Java Enumerations and Interfaces that can be used by other software components to access objects of the web fragment without having to have compile-time dependencies to the implementation classes. Often, the artifacts that are generated for this virtual project are put to a separate component to avoid circular dependencies between two JSF Web Fragment components.
However, when your web fragments are truly independent from other web fragments, you can simply map this virtual project to the same Eclipse project or directory as you’ve done it for JSF Web Fragment.
Maven POM files to be able to build the Maven modules
Selenium Base Tests abstract test classes, one for every page of the web fragment and one for every modeled test

Generator Options

Note

The following table describes generator options that are relevant for the generation of Java web applications. When you edit these options by means of the Virtual Developer Portal, you might find several occurrencies of an option on the options editing web page. This is not an error but means that one and the same option name is used for different parts of a generator. In such cases those options have the same meaning, but for a different part of the generator output.

Option Name Option Description Value Range Default Value
client‑side‑validation true enables PrimeFaces client-side validation true or false false
jsf-version set this version to the version that is supported by your JEE application server x.y, nominating major an minor JSF version 2.2
target.uri.prefix path for Java source code a valid relative path src/test/java for Java test code

src/main/java for Java implementation code

src/main/resources for Java resource files (e.g. properties files)
target.uri.prefix.
for.tests
path for Java test classes a valid relative path src/test/java
filter.keep-capability the name of the modeled capability for which you cant to generate code, you only need to set this option when your input model includes more than one capability
single-persistence-unit-name Set the name of the JPA persistence unit that is going to be used to inject a JPA entity manager in generated EJBs. You need to set this only when the input model includes entities. persistence_unit_name
default-namespace The package name to be used for generated Java files where that package name cannot be derived from a model element. com.vd
naming-stateless-postfix Names of generated EJB classes end with this string. Ejb
version.container Define the application server and its version that you are going to use to deploy the application. Note that the JEE version is derived from this setting. You have to set this option to get a correctly set up application server specific deployment descriptor. WILDFLY_10
WILDFLY_11
WILDFLY_12
WILDFLY_13
WILDFLY_14

GLASSFISH_4
GLASSFISH_5

PAYARA_5

OPENLIBERTY_18
OPENLIBERTY_19
WILDFLY_14
version.java JAVA_8
JAVA_11
JAVA_8
version.jee Note that when you set the option version.container, the JEE version is derived from that setting. The setting for version.jee is ignored then. JEE_7
JEE_8
JEE_8
version.primefaces Set the PrimeFaces version that you are going to use. There are JSF runtime library version for PrimeFaces 6 and 7. The Maven generation makes use of this information to set up the dependencies accordingly. PF_6
PF_7
PF_7
xml.sort-attributes true alphabetically sorts the attributes in the XHTML tags. This improves the readability and simplifies the procedure to diff&merge generated with manually written XHTML files. true or false false
maven.artifact-id-for-interface This option defines the naming rule for the artifact id of the web fragment interface component. You can use the variables ${capability-name} or ${namespace-name} ${capability-name}Interface
maven.artifact-id-for-ui This option defines the naming rule for the artifact id of the web fragment component. You can use the variables ${capability-name} or ${namespace-name} ${capability-name}Ui
maven.group-id-for-interface This option defines the naming rule for the group id of the web fragment interface component. You can use the variables ${capability-name} or ${namespace-name} ${namespace-name}
maven.group-id-for-ui This option defines the naming rule for the group id of the web fragment component. You can use the variables ${capability-name} or ${namespace-name} ${namespace-name}
maven.parent-pom-source This option defines whether and how to set the parent pom for the generated pom files. Setting this to NONE avoids the generation and usage of a parent pom file. UI_APPLICATION
SERVICE_APPLICATION
CAPABILITY
ORGANIZATION
NONE
CAPABILITY
maven.relative-path-for-interface This option defines the relative path where the pom file for the web fragment interface component is written to. You can use the variables ${capability-name} or ${namespace-name} ${capability-name}Interface
maven.relative-path-for-ui This option defines the relative path where the pom file for the web fragment component is written to. You can use the variables ${capability-name} or ${namespace-name} ${capability-name}Ui
maven.version-properties-scheme This option controls whether Maven properties are used to set component versions.

NONE ⇒ explicit versions

MINIMAL ⇒ parent pom sets the version property, all components get the same version

FULL ⇒ parent pom sets the version properties, every component gets an individual version
NONE
MINIMAL
FULL
NONE
test.generate-pre-and-post-conditions Set this to false when you do not want ...Precondition() and ...Postcondition() methods being generated in test classes for web page integration tests. true or false true
create-selection-dto When this is set to true, a separate DTO class is generated for every choice component and for every UI component that has an entity field mapped. See Data Management for more information. true or false false
dto.subpackage The generated code assumes that the class AbstractDto is in a package that ends with the value that is set for this option, e.g. package org.gs.gapp.rt.ejb;. This option lets you use customized runtime libraries. The org.gs.gapp.rt portion of the package name is taken from the modeled organization‘s namespace. ejb
jsf.datatable.editable-area This setting determines how fields in an editable table are made editable by a user.

TABLE ⇒ table fields are always editable

CELL ⇒ table fields are becoming editable when the user clicks on a cell in the table.

ROW ⇒ table fields are editable when the user clicks on a special edit icon in the last column of the table.
TABLE
CELL
ROW
TABLE
jsf.graphic-image-implementation Setting this option decides whether <p:graphicImage> or <o:graphicImage> is being generated for modeled UI components of type Image. OMNIFACES
PRIMEFACES
PRIMEFACES
jsf.i18n.language-codes This option determines which language-specific .properties files are going to be generated. See Internationalization for more information. Any valid language code can be provided in the comma-separated set of language codes. de,en
jsf.i18n.properties-key-rule This option determines how the keys in generated properties files are assembled.

SHORT ⇒ The key gives no indication as to which web page it is related to.

LOWERCASE_WITH_CONTEXT
or WITH_CONTEXT ⇒ The key starts with a prefix that gives you an idea about which part of the application it is related to, e.g. the name of a web page. The key is either all lowercase or has mixed case. This setting is to be preferred when you have many web pages in your web fragment/web application.
SHORT
LOWERCASE_WITH_CONTEXT
WITH_CONTEXT
LOWERCASE_WITH_CONTEXT
jsf.message-display-position This option defines whether validation messages are being displayed beneath an input component.

NONEno validation messages are displayed beneath an input component - use <p:messages> instead (see parameter layout.messagesPerPage)

BELOW ⇒ there are validation messages displayed beneath an input component
NONE
BELOW
BELOW
jsf.subpackage The generated code assumes that the class AbstractManagedBean is in a package that ends with the value that is set for this option, e.g. package org.gs.gapp.rt.jsf;. This option lets you use customized runtime libraries. The org.gs.gapp.rt portion of the package name is taken from the modeled organization‘s namespace. jsf
jsf.treetable.editable-area This setting determines how fields in an editable tree table are made editable by a user.

TABLE ⇒ tree table fields are always editable

CELL ⇒ tree table fields are becoming editable when the user clicks on a cell in the tree table.

ROW ⇒ tree table fields are editable when the user clicks on a special edit icon in the last column of the tree table.
TABLE
CELL
ROW
TABLE
toolbar-placement This setting controls whether toolbars are generally placed on the top or on the bottom of a section of a page. Note that you can overwrite this default setting in the model, e.g.: link Toolbars = MyToolbar Top;. TOP
BOTTOM
BOTTOM