Commit ef935bb9c1a6a2a33c22e8d2ea0e828a1c1544ba
1 parent
cd126a24
Exists in
master
Correção da mensagem de falha ou sucesso no envio do arquivo.
Showing
3 changed files
with
10 additions
and
0 deletions
Show diff stats
WebContent/WEB-INF/jsp/planoTrabalho/planoTrabalhoConfirmacao.jsp
... | ... | @@ -5,8 +5,15 @@ |
5 | 5 | |
6 | 6 | <t:baseLayout> |
7 | 7 | <jsp:body> |
8 | + | |
9 | + | |
8 | 10 | <div class="painelSucesso"> |
11 | + <c:if test="${status == true }"> | |
9 | 12 | <img src="imgs/afirmativo.jpg" alt="Confirmação de plano de trabalho enviado com sucesso!"><br> |
13 | + </c:if> | |
14 | + <c:if test="${status == false }"> | |
15 | + <img src="imgs/negativo.gif" alt="Falha de envio de plano de trabalho!"><br> | |
16 | + </c:if> | |
10 | 17 | <p><strong>${mensagem}</strong></p> |
11 | 18 | </div> |
12 | 19 | ... | ... |
8.31 KB
src/br/com/controller/PlanoTrabalhoController.java
... | ... | @@ -47,6 +47,7 @@ public class PlanoTrabalhoController { |
47 | 47 | Questionario questionario = new Questionario(); |
48 | 48 | questionario = hashDao.verificarHash(path, valorHash); |
49 | 49 | String mensagem = "Não foi possível enviar o plano de trabalho!"; |
50 | + boolean status = false; | |
50 | 51 | |
51 | 52 | if(questionario != null && questionario.getDtInicioQuestionario() != null) |
52 | 53 | { |
... | ... | @@ -55,6 +56,7 @@ public class PlanoTrabalhoController { |
55 | 56 | if(planoTrabalhoDao.salvarPlanoTrabalho(valorHash, file.getFile(), questionario)) |
56 | 57 | { |
57 | 58 | mensagem = "Plano de trabalho enviado com sucesso!"; |
59 | + status = true; | |
58 | 60 | } |
59 | 61 | } |
60 | 62 | else |
... | ... | @@ -62,6 +64,7 @@ public class PlanoTrabalhoController { |
62 | 64 | mensagem = "Favor verificar o Código Hash!"; |
63 | 65 | } |
64 | 66 | result.include("mensagem", mensagem); |
67 | + result.include("status", status); | |
65 | 68 | this.validator.add(new ValidationMessage("", "")); |
66 | 69 | this.validator.onErrorUsePageOf(PlanoTrabalhoController.class).planoTrabalhoConfirmacao(); |
67 | 70 | } | ... | ... |