src/application/Model.java
/*
     * Initialize the model. This will load the groups from the database, as
     * well as the reminders in the first group (if there is one).
     * If something goes wrong here, the exception is queued and the group
     * and/or reminder list starts out empty.
     */
Initialize the model. This will load the groups from the database, as
well as the reminders in the first group (if there is one).
If something goes wrong here, the exception is queued and the group
and/or reminder list starts out empty.
Initialize the model . This will load the groups from the database as well as the reminders in the first group ( if there is one ) . If something goes wrong here the exception is queued and the group and / or reminder list starts out empty .
public void initialize() {
        try {
            groups = FXCollections.observableArrayList(GroupsDAO.getInstance().findAllGroups());
        } catch (DAOException ex) {
            addException(ex);
            groups = FXCollections.observableArrayList();
        }
        if (!groups.isEmpty()) {
            selectedGroup = groups.get(0);
            try {
                reminders = FXCollections.observableArrayList(RemindersDAO.getInstance().findRemindersInGroup(selectedGroup));
            } catch (DAOException ex) {
                addException(ex);
                reminders = FXCollections.observableArrayList();
            }
        } else {
            selectedGroup = null;
            reminders = FXCollections.observableArrayList();
        }
        editingGroup = null;
        editingReminder = null;
    }
public void initialize ( ) { try { groups = FXCollections . observableArrayList ( GroupsDAO . getInstance ( ) . findAllGroups ( ) ) ; } catch ( DAOException ex ) { addException ( ex ) ; groups = FXCollections . observableArrayList ( ) ; } if ( ! groups . isEmpty ( ) ) { selectedGroup = groups . get ( 0 ) ; try { reminders = FXCollections . observableArrayList ( RemindersDAO . getInstance ( ) . findRemindersInGroup ( selectedGroup ) ) ; } catch ( DAOException ex ) { addException ( ex ) ; reminders = FXCollections . observableArrayList ( ) ; } } else { selectedGroup = null ; reminders = FXCollections . observableArrayList ( ) ; } editingGroup = null ; editingReminder = null ; }
Initialize the model.
Initialize the model .