Skip to main content
This guide covers advanced patterns, complex configurations, and expert techniques for working with the Kodexa Options system. Once you’re comfortable with basic options, these patterns will help you build sophisticated, user-friendly configuration interfaces.

Multi-Level Option Nesting

Options can be nested multiple levels deep to create hierarchical configuration structures:

Best Practices for Nesting

  1. Limit depth to 3 levels - Deeper nesting becomes hard to navigate
  2. Use collapsible groups - Allow users to focus on relevant sections
  3. Clear naming hierarchy - Use consistent naming patterns (e.g., config, settings)
  4. Document the structure - Provide examples showing the full path access

Dynamic Option Dependencies

Create complex conditional relationships between options:

Example: Conditional Chains

Complex Conditional Logic

Dynamic Possible Values

Generate dropdown options dynamically based on other selections:

Pattern: Filter Options Based on Selection

Pattern: Hierarchical Selection

Validation Patterns

Built-in Validation

Custom Validation in Code

Password and Secret Management

Organization Secrets Integration

The string option type with password: true integrates with organization secrets:
User Experience:
  • Users can either type the password directly
  • Or select from a dropdown of organization secrets
  • Secret references are stored as ${secret.secretName}
  • At runtime, Kodexa resolves the reference to the actual secret value
Benefits:
  • Centralized secret management
  • No hardcoded credentials in configurations
  • Easy rotation without updating all references
  • Secure storage and access control

Tab-Based Organization

For components with many options, organize them into tabs:

Real-World Examples

Example 1: SFTP Publishing Assistant

Example 2: Machine Learning Module Configuration

Example 3: Data Taxonomy with Properties

Performance Optimization

Lazy Loading for Option Dropdowns

For options that fetch data from APIs (like cloud-model, document-lookup): Built-in features:
  • Caching: cloud-model implements 3-minute localStorage caching
  • Pagination: Results are paginated to avoid overwhelming the UI
  • Search: Live search filters results as users type
Best practices:
  • Use showIf to delay loading heavy options until needed
  • Group related API-backed options to batch requests
  • Set sensible page sizes (default: 50 for cloud models)

Conditional Loading Pattern

Accessibility and User Experience

Clear Labeling

Progressive Disclosure

Start simple, reveal complexity only when needed:

Helpful Defaults

Contextual Help

Testing and Debugging

Validating Option Definitions

Testing Option Interactions

Migration and Versioning

Adding New Options (Backward Compatible)

Deprecating Options

Handling Migration in Code

Summary

Advanced options features enable:
  • Complex configurations through multi-level nesting
  • Dynamic behavior with conditional visibility and dependencies
  • User-friendly interfaces with progressive disclosure and clear guidance
  • Secure credential management with organization secrets integration
  • Performance optimization through lazy loading and caching
  • Backward compatibility through careful versioning and migration strategies
Master these patterns to create professional, flexible configuration interfaces that scale from simple to enterprise-complex requirements.