JSF: Error messages inside the catch block does not appear on the screen

Asked

Viewed 483 times

1

I have a JSF application and created a Basebean class to generate the messages that appear on the screen when an event occurs.

Well, in Managedbean when I call the Basebean class to send a message to the user right after an instruction the message appears on the screen. But when the code snippet is inside a Try/catch block and this code raises the exception by entering the catch block. And when I call the Basebean class to send the error message to the user NOTHING appears on the screen.

i.e., in the catch block the message call NOT appears on the screen!

Class call in catch block: inserir a descrição da imagem aqui

basebean class: inserir a descrição da imagem aqui

pages:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • Places the html as well.

  • posted the link and form page.

  • The fact of falling into catch does not have much relevance unless you run something different. Try not to associate the message to the form, using the method that does not receive the componentId and passes a null.

  • In this case I put only the error message, see that the Basebean class methods are overloaded. But it has not solved. the exception is released on the console since I call the e.printStackTrace(), then I was thinking that the question is not only to send the message to screen but to take the exception thrown to screen! because the system behaves as if there was no error, answers the request usually only when it sees the answer is in error! in my case the generation of a report. it creates and transfers the report. The problem is only identified when opening it there give error.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.