
package de.ivu.elect.jee.presentation;

import javax.annotation.Nullable;

public interface DialogActionListener {

  boolean isShowDialog();

  /**
   * Überschreiben, wenn Dialog geöffnet werden soll
   */
  @Nullable
  String getDialogName();

  String getDialogId();

  String getDialogFormId();

  String getDialogWidgetVar();

  public static String createDialogId(String dialogName) {
    return "dlg" + dialogName;
  }

  public static String createDialogFormId(String dialogName) {
    return "frm" + dialogName;
  }

  public static String createDialogWidgetVar(String dialogName) {
    return createDialogId(dialogName) + "Widget";
  }
}
