Creating properties view widgets

A Management Center widget can display and edit business object properties in a properties view. By extending the wcfPropertyEditor class, your new widget becomes an editor within a properties view.

About this task

To create a properties view widget, complete the following steps:
Note: Widget is a variable name for your new widget type.

Procedure

  1. Create a class named extWidget that extends the OpenLaszlo basecomponent class:
    1. Create and support an attribute named property which is an instance of wcfModelProperty.
    2. Register a delegate to listen to the onvalue event on that property and update the display of the property to reflect the new value if the property changes.
    3. When the business user changes the property value, call the wcfModelProperty change method.
  2. Create an extPropertyWidget class that extends wcfPropertyEditor and create an instance of wcfWidget by overriding the createEditor() method. By extending the wcfPropertyEditor class, your new widget becomes a valid component of a properties view. Your wcfPropertyWidget can now be used to define the widget inside a properties view.

Example

The following diagram illustrates the process for creating properties view widgets.

Creating a properties view widget

What to do next

After you create your properties view widget:
  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 setting is the default environment setting.
  2. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  3. Deploy your changes to your production environment.