Search in sources :

Example 1 with StringAreaView

use of eu.ggnet.dwoss.redtapext.ui.cao.common.StringAreaView in project dwoss by gg-net.

the class RedTapeController method openEditComment.

/**
 * Opens a dialog to edit a dossiers comment.
 * <p/>
 * If Dossier.id equals 0, a wrapped Dossier from an old Sopo Auftrag is assumed and no change can be made.
 * <p/>
 * @param dossier the dossier from wich the comment will be changed
 */
public void openEditComment(Dossier dossier) {
    if (model.getSelectedDossier() == null) {
        JOptionPane.showMessageDialog(view, "Kein Auftrag ausgewählt");
        return;
    }
    StringAreaView sav = new StringAreaView(dossier.getComment());
    OkCancelDialog<StringAreaView> dialog = new OkCancelDialog<>(parent(), Dialog.ModalityType.DOCUMENT_MODAL, "Bemerkungen editieren", sav);
    dialog.setVisible(true);
    if (dialog.getCloseType() == CloseType.OK) {
        try {
            Dossier dos = Dl.remote().lookup(RedTapeWorker.class).updateComment(model.getSelectedDossier(), sav.getText());
            reloadSelectionOnStateChange(dos);
        } catch (UserInfoException ex) {
            Ui.handle(ex);
        }
    }
}
Also used : StringAreaView(eu.ggnet.dwoss.redtapext.ui.cao.common.StringAreaView) Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier)

Aggregations

Dossier (eu.ggnet.dwoss.redtape.ee.entity.Dossier)1 StringAreaView (eu.ggnet.dwoss.redtapext.ui.cao.common.StringAreaView)1