
Troubleshooting: Custom unique ID not defined while running OL unique ID validation
When running the OL Unique ID Validation tool, a warning message indicates that the custom file might contain custom objects where unique IDs are not defined.
Problem
- The instance name itself is a unique identifier. For example mktExperimentValidator is a unique identifer.
- The instance name and the value of an
attribute form the unique
identifier. In most cases, the attribute used is
package
. For example, the unique identifier of the element <ExperimentValidator validatorId='xyz' package='mkt'/> should be mktExperimentValidator. - The instance name and the combinations of values of attributes form the unique identifier.
When running the OL Unique ID Validation for a custom OpenLaszlo file including .lzx or .def file, there are warnings indicating that the added custom file might contain custom objects where unique ids are not defined.
Example 1:
You add a new lzx file, for examplenewfilename.lzx, in the /LOBTools/WebContent/WEB-INF/src/lzx directory. The file contains the following:
<wcfBaseComboBox id="optionSelector" name="optionSelector" width="235">
<catDSITextlistitem text="Gift box" value="11200" selected="true"/>
<catDSITextlistitem text="Gift wrap" value="2" />
<catDSITextlistitem text="Free message" value="0" />
</wcfBaseComboBox>
When you save the file and run the
OL Unique ID Validation tool, you receive the following warning message:The Unique ID for catDSITextlistitem is not defined.
Example 2:
You make a customization in a certain definition file under /LOBTools/WebContent/config, such as:
<PrimaryObjectDefinition baseDefinitionName="ctBaseLayoutPrimaryObjectDefinition"creatable="true" definitionName="Layout" objectType="Layout">
<CreateNewObjectTypeFromObjectClientAction displayName="${ctLayoutResources.duplicateLayout}" package="mkt" targetObjectType="Layout"/>
<CreateNewObjectTypeFromObjectClientAction displayName="${ctLayoutResources.createTemplateFromLayout}" package="mkt" targetObjectType ="LayoutTemplate"/>
</PrimaryObjectDefinition>
After you save the file and
run the OL Unique ID Validation tool, you receive a warning message:The warning is that the Unique ID for CreateNewObjectTypeFromObjectClientAction is not defined.
The warning is that the Unique ID for mktCreateNewObjectTypeFromObjectClientAction is not defined. Go to the file /LOBTools/WebContent/properties/custom_def_unique_IDs.properties to define the Unique ID for mktCreateNewObjectTypeFromObjectClientAction.
Solution
Example 1:
If the added file has a suffix with .lzx, you should add unique ID definitions in the file custom_unique_IDs.properties under \LOBTools\WebContent\properties for all the custom objects. If the added file has a suffix with .def, you should add unique ID definitions in the file custom_def_unique_IDs.properties under \LOBTools\WebContent\properties for all the custom objects.
- Append the following definition to the file custom_unique_IDs.properties under \LOBTools\WebContent\properties:
catDSITextlistitem=text
- Run the OL Unique ID Validation tool again.
Example 2:
To solve the problem of the unique ID not being defined in the definition files, perform the following steps:
- Append the following
definition to the file custom_def_unique_IDs.properties under \LOBTools\WebContent\properties:
mktCreateNewObjectTypeFromObjectClientAction=targetObjectType
- Run the OL Unique ID Validation tool again.