Creating list view widgets

A Management Center widget can display and edit business object properties in a list view.

About this task

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

Procedure

  1. Create a cell editor class named extGridWidgetEditor that subclasses the OpenLaszlo view class:
    Note: A cell editor is a view instance that enables the business user to update the value of a model property.
    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 a cell viewer class named extGridWidgetViewer that extends the OpenLaszlo view class:
    Note: A cell viewer is a view instance that displays the value of a model property.
    1. Create and support an attribute named property which is an instance of wcfModelProperty and display the property value.
    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 change the property value, call the wcfModelProperty change method.
  3. Create a class that extends wcfGridColumn and set the cellEditorClass and cellViewerClass attributes to the cell editor and cell viewer classes.

Example

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

Creating a list view widget

What to do next

After you create your list 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.