-
1. Re: Message in PaginationDataModel
nbelaevski Sep 30, 2010 10:37 PM (in response to krasig)Hi Krasimir,
Can you please provide more details on the problem?
-
2. Re: Message in PaginationDataModel
krasig Oct 1, 2010 4:19 AM (in response to nbelaevski)PaginatingDataModel extends SerializableDataModel
Usually in walk method we execute SELECT statement and if in this statement have some problem (syntax, DB Lock ...) we catch this and send message to user with addMessage, but message never shown on page.
Just put in walk method
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(severity, message, details));Regards.
-
3. Re: Message in PaginationDataModel
nbelaevski Oct 4, 2010 10:50 AM (in response to krasig)Krasimir,
This won't work well as components are rendered sequentially, so h:messages/rich:messages will render what has been queued by that moment and then your code adds messages.
Either place messages component after the table or use another style of errors reporting (e.g. throw exception).