Configuration

To configure and register the model processor you must:

  1. Create a file called HelloWorldWidgetDefaultViewModelProcessor.properties.

  2. Enter the following in the file:

    $class=com.mycompany.view.processor.HelloWorldWidgetDefaultViewModelProcessor
    viewNames=default

    You can specify several view names when you define viewNames: use a comma to separate them.

  3. Create a file called HelloWorldWidgetDescriptor.properties.

  4. Enter the following in the file:

    $class=com.escenic.framework.descriptor.WidgetDescriptor
    widgetName=helloWorld
    modelProcessor.helloWorld.1=/com/escenic/framework/controller/HelloWorldWidgetDefaultViewModelProcessor

    Note the .1 on the last line above: you can specify more than one model processor for a widget. If, for example, you wanted to add a second model processor to handle a custom view then you would need to add another entry like this:

    modelProcessor.helloWorld.2=/com/escenic/framework/controller/HelloWorldWidgetCustomViewModelProcessor

    (Of course, you would then also need to repeat steps 1 and 2 to configure your HelloWorldWidgetCustomViewModelProcessor as well.)

  5. Create a file called DescriptorRegistry.properties.

  6. Enter the following in the file:

    $class=com.escenic.framework.descriptor.DescriptorRegistry
    widgetDescriptor.helloWorld=./HelloWorldWidgetDescriptor