Develop > Presentation layer > Management Center framework > Customize the Management Center user interface > Customizing an existing Management Center tool > Changing validation logic
Remove a validation rule
Remove a validation rule from the Management Center user interface. For example, you can change a required field into an optional field.
To remove a validation rule:
Procedure
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > Management_Center_component > objectDefinitions, where Management_Center_component is the name of the tool to customize.
- Locate the file that contains the validation rule that to remove. Open the file and locate the object definition class that contains the validation rule.
- Delete the validation rule from the object definition. There are three ways that validation rules can be specified. Each is removed in a different way.
- A validation rule can be specified with one of these property definition attributes: maximumSize, maxValue, minValue, required or type.
To remove this type of validation rule, delete the attribute from the property definition declaration.
- A validation rule can be specified by declaring an instance of a class that extends wcfValidator as a child element of an instance of wcfPropertyDefinition. To remove this type of validation rule, delete the validator declaration. For example, delete <extNoSpaceValidator/> from the following property definition.
<wcfPropertyDefinition displayName="${catalogResources.categoryCode_DisplayName.string}" propertyName="identifier" type="string required="true" maximumSize="254"> <extNoSpacesValidator/> </wcfPropertyDefinition>
- A validation rule can be specified by declaring an instance of a class that extends wcfValidator as a child element of an object definition (wcfObjectDefinition). To remove this type of validation rule, delete the validator declaration. For example, delete <catOfferPriceMinimumQuantityUniquenessValidator/> from the following property definition.
<class name="catBaseCatalogGroupSKUPrimaryObjectDefinition" extends="wcfPrimaryObjectDefinition" baseType="catBaseCatalogEntryPrimaryObjectDefinition" isBaseDefinition="true" objectGroups="CatalogEntry,SKUs,CatalogGroupSKUs" idProperty="catentryId" propertiesClass="catCatalogGroupSKUProperties" displayName="${catalogResources.displayNameCategoryLevelSKU.string}" newDisplayName="${catalogResources.displayNameNewCategoryLevelSKU.string}" displayNameProperty="partnumber" searchType="FindAllCatalogEntries" helpLink="tasks/tpngen1s.htm"> ... <!--- Validator to check for duplicates in the offer price minimum quantity values. --> <catOfferPriceMinimumQuantityUniquenessValidator/> </class>
What to do next
After you complete the customization:
- Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory. This is the default environment setting.
- Test the changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
- Deploy your changes to the production environment.
Related concepts
Management Center user interface
Related tasks