Guest User

Untitled

a guest
Nov 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. try {
  2.  
  3. Sistema sistema = new Sistema();
  4. SistemaDao sistemaDao = new SistemaDao();
  5. sistema = sistemaDao.buscaPorId(idSistema);
  6.  
  7. InterfaceDao interfaceDao = new InterfaceDao();
  8. interfaceSistema.setSistema(sistema);
  9. interfaceDao.atualizar(interfaceSistema);
  10.  
  11. String msg = "Interface " + interfaceSistema.getDescricao() + " Alterada com sucesso";
  12.  
  13. FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
  14. FacesContext context = FacesContext.getCurrentInstance();
  15. context.addMessage(null, message);
  16.  
  17. } catch (RuntimeException e) {
  18. throw new RuntimeException("Erro ao atualizar a interface no Bean");
  19. } finally {
  20. listarInterface();
  21. }
  22. }
  23.  
  24. interfaceSistema = (Interface) evento.getComponent().getAttributes().get("interfaceSelecionado");
Add Comment
Please, Sign In to add comment