Skip to end of metadata
Go to start of metadata

Rice Dictionary Validator

The Rice Dictionary Validator will be used by application developers to verify they have correctly configured an XML bean definition. This will apply both for the Data Dictionary and UI Dictionary. Examples types of validations the validator will perform are:

  • Required Properties
  • Invalid Property Values
  • Invalid Property Combinations

The validator will output zero or more errors with information on where they were found and if possible how to correct them.

Usage Scenarios

  1. Dictionary configuration is validated on startup of the application. A Rice configuration parameter can be used to turn startup validation on/off.
  2. Developers can run validation without starting up the application by running validator as Java main or through Rice Tools GUI.
  3. Developers can validate an individual XML file by running validator as Java main or through Rice Tools GUI. (Note this will require also loading core KRAD XML files and any core Module XML files)


Component/Class Rule Listing

Note the following rules should apply to all subclasses as well unless explicitly noted otherwise.

**Highest priority to implement (blocker)
* Major priority to implement
No stars - lowest implementation priority

Severity key:

Bold - resulting message output to dev should be an error
Non-bold - resulting message output to dev should be a warning


  1. **propertyName is required
  2. *Both the defaultValue and defaultValues property must not be given (0 or 1 only)
  3. *If propertyEditor given, must be a valid class on the classpath
  4. if applyMask is true, maskFormatter must have a value


  1. *entryPageId must be a valid id for one of the top level components in the view's items list
  2. viewStatus property should not be specified
  3. **defaultBindingObjectPath must be a valid property (with a valid getter) on the specified form class (formClass property)
  4. **when singlePageView is true, items cannot contain PageGroups
  5. *when singlePageView is false, items must be PageGroups
  6. when singlePageView is true, page cannot be null
  7. if growlsMessagingEnabled is true, growls must not be null
  8. items should contain at least 1 item when singlePageView is false


  1. can’t think of any


  1. **id cannot contain ' or " or [] or . or # in its value
  2. if selfRendered is false, template must have a value
  3. Warn the following: DO NOT use progressiveRender and conditionalRefresh on the same component unless it is known that the component will always be visible in all cases when a conditionalRefresh happens (ie conditionalRefresh has progressiveRender's condition anded with its own condition). If a component should be refreshed every time it is shown, use the progressiveRenderAndRefresh option with this property instead.
  4. **progressiveRender must contain the @{} springEL format
  5. **conditionalRefresh must contain the @{} springEL format
  6. *progressiveRender and conditionalRefresh cannot include calls to springEl functions other than # empty() at this time – because these 2 properties only allow a subset
  7. if progressiveRenderViaAjax or progressiveRenderAndRefresh are true, progressiveRender MUST have a value
  8. *methodToCallOnRefresh and resetDataOnRefresh should only have a value if progressiveRenderAndRefresh or refreshedByAction or progressiveRenderViaAjax is true, refreshTimer has a value, or conditionalRefresh has a value
  9. *colSpan and rowSpan should only be set when this Component is used as an item of Uif-GridGroup or child of Uif-GridGroup
  10. need to warn if overriding instead of merging cssClasses on beans that have Uif- beans as a parent (don’t know if possible to check)
  11. I’m guessing that both disableSessionPersistence and forceSessionPersistence cannot be true at the same time
  12. *if selfRendered is true, renderedHtmlOutput must have a value


  1. **condition must follow SpringEL syntax @{} etc
  2. propertyName, condition, and replacement-ref are all required


  1. collectionObjectClass must be specified (unless collection is abstact)


  1. layoutManager must be set
  2. warn if both instructionalText and instructionalMessage object’s messageText are set (object’s value will always override)


  1. **Group cannot contain PageGroup or NavigationGroup in its items


  1. **PageGroup cannot contain PageGroup or NavigationGroup in its items


  1. When used in InputField warn if both label and checkboxLabel are set


  1. warn when tabIndex is set as this can cause problems with accessibility and page flow


  1. *actionLabel and/or actionImage must have a value
  2. only 1 jumpTo attribute should be set


  1. only 1: refreshId or refreshPropertyName should be set


  1. warn if displayMessages is false at the page level – not recommended user experience


  1. *allowed values for header level are (case-insensitive) h1, h2, h3, h4, h5, h6, label
  2. header text must be set
  3. lowerGroup should not be null when header.items are set. Or, initialize lowerGroup when there are items


  1. *source must be set


  1. *source must be set
  2. altText should be set, warn that it violates accessibility standards if not set


  1. **if render == true, labelText should have a value


  1. **linkText and href must be set


  1. messageText must have a value – warn


  1. action should be non-null
  2. if label is null, warn that they should use Action instead


  1. one (not sure if multiple) should have a value: dataObjectClass, queryMethodToCall, queryMethodInvokerConfig


  1. *control must be non-null


  1. *link must be non-null
  2. if label is null, warn that they should use Link instead


  1. *message must be non-null
  2. if label is null, warn that they should use Message instead


  1. if label is null, warn that they should use Space instead


  1. *if rowDetailsGroup is set, richTable must not be null and richTable.render must be true


  1. states must be set when not abstract (used on a View or DataDictionaryEntry)
  2. statePropertyName must be set


  1. whenConstraint must include at least 1 whenConstraint


  1. *constraint cannot be null
  2. values or valuePath cannot be null


  1. prerequisiteConstraints or mustOccurConstraints cannot both be empty/null
  2. max must be greater than 0


  1. precision must be greater than scale


  1. validChars must be set


  1. children of this class must return a value when getValue is called


  1. *BaseConstraints defined in the constraintStateOverrides list MUST have their states property set
  2. warn if labelKey is not set on non-abstract children

Outstanding Issues

  1. Can we validate a single XML file? That is, can we do any validation without loading the whole container
  2. How should we deal with expressions? These cause the original property configuration to get lost and are not replaced until a view is requested

Technical Analysis:

  • No labels