Sometimes your builder encounters conflicts with other elements in a model.
For example, if you have a page in your base model called page1
, you will get conflicts if your new builder is added to a model that already has a page1
. In addition, if you want to use your new builder more than once in the same model, a similar conflict arises.
To avoid name conflicts, you can use the basename feature. The basename feature will generate model-wide unique names for your builder inputs (especially important for the names of generated artifacts such as LJOs and pages). This prevents name collisions when your builder is used multiple times in the same model.
To use the basename feature, first make sure that your builder has a Name
input. Then, in your base model, use the string basename (without the quotes) as a pattern for any builder inputs that you want to be unique. For example, you might use basename as the Name
value input for the low-level builder and use basename_ResultsPage
as the name of the results page. If the user then specifies films
as the Name
input in your builder, the page is named films_Results
. This pattern is followed for all inputs that start with the string basename
. The basename feature thus serves as an alias in various element names in the model.
Parent topic: About modelbased builder creation: wpf7