From be36ba967e0ee2612e448d47cd020aac5d75c928 Mon Sep 17 00:00:00 2001 From: maroni Date: Thu, 15 Mar 2012 00:25:14 -0300 Subject: [PATCH] --- .../simdecs/comunicacao/MetodoIniciaCaso.java | 8 ++++---- web/login.xhtml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java b/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java index 61d4644..9383f9c 100644 --- a/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java +++ b/src/java/org/ufcspa/simdecs/comunicacao/MetodoIniciaCaso.java @@ -43,16 +43,16 @@ public class MetodoIniciaCaso extends HttpServlet { private String getRespostaNodo(Long idNodo) { EntityManager em = DbUtil.getInstance().getEntityManager(); - List perguntas = em.createQuery("From RespostaNodo where nodo.id=:pIdNodo") + List respostas = em.createQuery("From RespostaNodo where nodo.id=:pIdNodo") .setParameter("pIdNodo", idNodo) .getResultList(); - int random = (int) (1+Math.random()*perguntas.size()); + int random = (int) (1+Math.random()*respostas.size()); int i=1; - for(PerguntaNodo pergunta : perguntas) { + for(RespostaNodo resposta : respostas) { if (i++ == random) - return pergunta.getTexto(); + return resposta.getTexto(); } return ""; diff --git a/web/login.xhtml b/web/login.xhtml index 47c9bf2..bcdd15a 100644 --- a/web/login.xhtml +++ b/web/login.xhtml @@ -33,7 +33,7 @@

- + -- 1.7.6.4