try { save(); Util.noteMessage(session, "The " + prettyName() + " '" + getName() + (is_new ? "' was created." : "' updated.")); } catch (SQLException se) { Util.noteError(session, se.toString()); }
save(); Util.noteMessage(session, "The " + prettyName() + " '" + getName() + (is_new ? "' was created." : "' updated."));
    public void respondToEditForm (HttpServletRequest request,                                 HttpSession session)    {        String name = Util.getRequiredField(request, session, "name");        if (name != null) {            boolean is_new = isNew();            NamedRecord old = loadByName(name);            if ((is_new && old != null)                || (old != null && old != this)) {                Util.noteError(session,                               "A " + prettyName()                               + " by that name already exists.  Please choose a different name.");                return;            }            setName(name);            try {                save();                Util.noteMessage(session,                                 "The " + prettyName() + " '" + getName()                                 + (is_new ? "' was created." : "' updated."));            } catch (SQLException se) {                Util.noteError(session, se.toString());            }        }    }