com.im.ijc.core/1 5.9.4

com.im.ijc.core.api.views
Interface IJCWidgetFactory


public interface IJCWidgetFactory


Nested Class Summary
static interface IJCWidgetFactory.Provider
          Interface, which can look up the IJCWidgetFactory using its ID.
 
Method Summary
 IJCWidget.DesignerHandle createWidget(DFView view)
          Should create and return a new widget.
 String getDisplayName()
           
 String getFactoryId()
           
 IJCWidget.DesignerHandle restoreWidget(DFView view, List<? extends DFField> fields, Object settings, Compatibility compatibility)
          Recreates widget from the given settings.
 Object updateSettings(Object settings, Map<? extends DFField,? extends DFField> fieldsMapping)
          Update fields in widget settings object.
 

Method Detail

getFactoryId

String getFactoryId()

getDisplayName

String getDisplayName()

createWidget

IJCWidget.DesignerHandle createWidget(DFView view)
Should create and return a new widget. It might return null if creation process fails. E.g. when wizard for creating a new widget was cancelled by user.

Parameters:
view - containing view for a widget
Returns:
widget or null

restoreWidget

IJCWidget.DesignerHandle restoreWidget(DFView view,
                                       List<? extends DFField> fields,
                                       Object settings,
                                       Compatibility compatibility)
Recreates widget from the given settings.

Parameters:
view - containing view for a widget
fields - fields to which this widget shall be bound
settings - stored settings to be used for widget re-creation.
compatibility - backward compatibility container
Returns:
widget

updateSettings

Object updateSettings(Object settings,
                      Map<? extends DFField,? extends DFField> fieldsMapping)
Update fields in widget settings object. This method is used for example when widget is copied from one form to another and settings contain links to field(s). When source and target forms belong to different entities (datatrees) then fields must be mapped. The fieldsMapping map specifies how source fields are mapped to fields in target datatree.

Parameters:
settings - The original settings object for widget
fieldsMapping - Mapping of fields from original field to new
Returns:
The updated settings object which contains only new fields

com.im.ijc.core/1 5.9.4