com.sdm.quasar.client.showcase.jsf.dialogs.dialogtypes
Class ComplexDialogCore

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.showcase.jsf.dialogs.dialogtypes.ComplexDialogCore
All Implemented Interfaces:
Feature, SystemInfoProvider

public class ComplexDialogCore
extends AbstractFeature

For more complex dialog it's better to separate core and presentation. This is the dialog core for such an example. For dataBinding we use a DataManger and for actionBinding we use this dialog core as a bean.

Author:
Erika Buchholz

Field Summary
static java.lang.String DATA_ARTICLE_REGISTRY
           
static java.lang.String DATA_ARTICLE_SELECTED
           
static java.lang.String DATA_ARTICLE_SELECTED_COMMENTS
           
static java.lang.String DATA_ARTICLE_SELECTED_NAME
           
static java.lang.String DATA_MODEL_ARTICLE_LIST
           
static java.lang.String DATA_NEW_COMMENT
           
static java.lang.String DATA_ROW_CLASSES
          the css class for the background color of the table rows
 
Constructor Summary
ComplexDialogCore()
           
 
Method Summary
 void dispose()
          Called when the feature or dialog is disposed.
 java.lang.String highLightRow()
          Defines the CSS class for the row.
 void init()
          Called when the feature is initializing.
 boolean isCommentDisabled()
          Decides, if the button for saving a comment is disabled or not.
 void saveComment()
          Adds a comment to the selected article.
 void selectArticle()
          Selects an article by highlighting the row.
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
activate, attachDialogControl, collectSystemInfo, deactivate, disposeFeature, getDialogControl, isInitialized, prepare, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_ARTICLE_REGISTRY

public static final java.lang.String DATA_ARTICLE_REGISTRY
See Also:
Constant Field Values

DATA_MODEL_ARTICLE_LIST

public static final java.lang.String DATA_MODEL_ARTICLE_LIST
See Also:
Constant Field Values

DATA_ARTICLE_SELECTED

public static final java.lang.String DATA_ARTICLE_SELECTED
See Also:
Constant Field Values

DATA_ARTICLE_SELECTED_NAME

public static final java.lang.String DATA_ARTICLE_SELECTED_NAME
See Also:
Constant Field Values

DATA_ARTICLE_SELECTED_COMMENTS

public static final java.lang.String DATA_ARTICLE_SELECTED_COMMENTS
See Also:
Constant Field Values

DATA_NEW_COMMENT

public static final java.lang.String DATA_NEW_COMMENT
See Also:
Constant Field Values

DATA_ROW_CLASSES

public static final java.lang.String DATA_ROW_CLASSES
the css class for the background color of the table rows

See Also:
Constant Field Values
Constructor Detail

ComplexDialogCore

public ComplexDialogCore()
Method Detail

init

public void init()
Description copied from class: AbstractFeature
Called when the feature is initializing. This is normally done, when the feature is connected to the lifecycle of the DialogControl installed to. To access the DialogControl use the AbstractFeature.getDialogControl() method.

Override this method to perform some action on initialization e.g. register public services.

Specified by:
init in class AbstractFeature

dispose

public void dispose()
             throws DisposeException
Description copied from class: AbstractFeature
Called when the feature or dialog is disposed. Override this method to clean up resources and free memory when disposing.

Specified by:
dispose in class AbstractFeature
Throws:
DisposeException

selectArticle

public void selectArticle()
Selects an article by highlighting the row.


saveComment

public void saveComment()
Adds a comment to the selected article.


isCommentDisabled

public boolean isCommentDisabled()
Decides, if the button for saving a comment is disabled or not. Depends on if an article is selected.


highLightRow

public java.lang.String highLightRow()
Defines the CSS class for the row. Normal values are "even" and "odd", if the row was selected by the user it's "selected".