All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.jarch.faces.controller.Controller Maven / Gradle / Ivy

package br.com.jarch.faces.controller;

import br.com.jarch.faces.util.JsfUtils;

public abstract class Controller implements IController {

    private static final String LOGIN_PAGE = "../login/login.jsf";
    private String textoAjuda;

    @Override
    public String getTextoAjuda() {
        return textoAjuda;
    }

    @Override
    public void setTextoAjuda(String textoAjuda) {
        this.textoAjuda = textoAjuda;
    }

    @Override
    public String getContextoAplicacao() {
        return JsfUtils.getContextPath();
    }

    @Override
    public void redireciona(String pagina) {
        JsfUtils.redirect(pagina);
    }

    public void efetuaLogoff() {
        JsfUtils.getSession().invalidate();
        redireciona(LOGIN_PAGE);
    }

    @Override
    public void addCallbackParam(String nome, Object value) {
        JsfUtils.addCallbackParam(nome, value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy