예제 #1
0
void IndexProcessor::process(HTTPRequest& request) {
    Session* s = SessionManager::instance()->getSession(request.getSessionId());

    QString lang = request.getParameter("lang").toString();
    if (!lang.isEmpty()) {
        Translate::instance()->load(lang);
    }

    addNotify(s->getNotification("connection"));
    addNotify(s->getNotification("listing"));
}
예제 #2
0
void ServerListProcessor::process(HTTPRequest& request) {
    Session*     s = SessionManager::instance()->getSession(request.getSessionId());
    addNotify(s->getNotification("edit"));

    ITable* object = DatabaseManager::instance()->getTable("server");
    if (object == 0) {
        s->setNotification("listing", "Entity 'server' doesn't exists.", UI::Notify::ERROR);
        request.redirect("index");
        return;
    }

    _table = UI::ModelWidgetFactory::instance()->getListWidget("serverConfigurationList");
    if (_table == NULL) {
        s->setNotification("listing", "Model Entity List 'serverConfiguration' doesn't exists.", UI::Notify::ERROR);
        request.redirect("index");
    } else {
        _table->fill(object->getAll());
    }
    delete object;
}