Configuration
To configure and register the model processor you must:
-
Create a file called
HelloWorldWidgetDefaultViewModelProcessor.properties
. -
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. -
Create a file called
HelloWorldWidgetDescriptor.properties
. -
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 acustom
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.) -
Create a file called
DescriptorRegistry.properties
. -
Enter the following in the file:
$class=com.escenic.framework.descriptor.
DescriptorRegistry
widgetDescriptor.helloWorld=./HelloWorldWidgetDescriptor