Package br.gov.serpro.ouvidoria.controller.andamento

Examples of br.gov.serpro.ouvidoria.controller.andamento.ConsultarBancoScriptsCtrl


        List scripts = null;
        ActionErrors errors = new ActionErrors();

        try {
            ConsultarBancoScriptsCtrl consultarBancoScriptsCtrl = new ConsultarBancoScriptsCtrl(
                    getDaoFactory());

            DynaActionForm _form = (DynaActionForm) form;

            String lsTexto = Utilitario.trataPlic(_form.getString("txtBusca"));
            String lsAssunto = _form.getString("txtAssunto");
            String lsAtivo = _form.getString("chkAtivoBanco");
            String lsInAtivo = _form.getString("chkInativoBanco");
            String situacao = "";

            // Trata checkboxes selecionados
            if (((lsAtivo == null) && (lsInAtivo == null))
                    || ((lsAtivo.equalsIgnoreCase("S")) && (lsInAtivo
                            .equalsIgnoreCase("S")))) {
                situacao = "Ambos";
            } else if ((lsAtivo != null) && (lsAtivo.equalsIgnoreCase("S"))) {
                situacao = "Ativo";
            } else if ((lsInAtivo != null) && (lsInAtivo.equalsIgnoreCase("S"))) {
                situacao = "Inativo";
            }

            // Recupera o Funcionário logado
            Long funcionarioId = (Long) request.getSession().getAttribute(Constants.PA_FUNCIONARIO);
           
          FuncionarioCtrl funcionarioCtrl = new FuncionarioCtrl(getDaoFactory());
         
          Funcionario func = (Funcionario) funcionarioCtrl.get(funcionarioId)

            // recupera os scripts
            scripts = consultarBancoScriptsCtrl.ListarScript(lsTexto,
                    lsAssunto, func, situacao);

            if (scripts == null) {
                errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                        "error.script.notFound"));
View Full Code Here


            throws Exception {

        ActionErrors errors = new ActionErrors();
        try {

            ConsultarBancoScriptsCtrl consultarBancoScriptsCtrl = new ConsultarBancoScriptsCtrl(
                    getDaoFactory());

            Long id = new Long(request.getParameter("id"));

            Script script = consultarBancoScriptsCtrl.get(id);

            if (script == null) {
                errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
                        "error.script.notFound"));
            }
View Full Code Here

TOP

Related Classes of br.gov.serpro.ouvidoria.controller.andamento.ConsultarBancoScriptsCtrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.