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

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.

  2. 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.

  3. 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.

  4. 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.

    1. 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.

    2. 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>
      

    3. 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:

  1. 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.

  2. Test the changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.

  3. Deploy your changes to the production environment.


Related concepts

Management Center shell

Management Center user interface


Related tasks

Changing validation logic


+

Search Tips   |   Advanced Search