com.sdm.quasar.client.core.dialog
Interface Feature

All Known Implementing Classes:
AbstractFeature

public interface Feature

Feature is an (almost) tagging interface for the user-written or reused parts of a dialog.

Why using Features? It is not necessary to use features together with DialogControl, but we force users to do so. The advantages of Features are:

To be able to use the dialog environment, the Feature implementations should have access to the DialogControl. The DialogControl can be passed using dependency injection (e.g. calling the constructor), but may also beeing passed using attachDialogControl(DialogControl).

Note: If a DialogControl was passed via constructor, Feature must be installed to the same DialogControl, so that attachDialogControl(DialogControl) is called with the same DialogControl instance. Without calling attachDialogControl(DialogControl), the Feature will not be attached to the dialog lifecycle.

Version:
1.$Revision$
Author:
Thomas Wolf

Method Summary
 void attachDialogControl(DialogControl dialogControl)
          Attaches the lifecycle of the Feature to the lifecycle of the DialogControl given.
 void disposeFeature()
          Detaches the lifecycle of the Feature from the lifecycle of the DialogControl previouse given and disposes the feature.
 

Method Detail

attachDialogControl

public void attachDialogControl(DialogControl dialogControl)
Attaches the lifecycle of the Feature to the lifecycle of the DialogControl given. The feature must not be attached twice.

Note: This method has to be called after the feature was completely created.


disposeFeature

public void disposeFeature()
Detaches the lifecycle of the Feature from the lifecycle of the DialogControl previouse given and disposes the feature. After calling this method must not be used again. Also attaching to a DialogControl is forbidden after calling this method.