But then, in the converter I have
@In private EntityManager entityManager
which is conversation-scoped, so the context must be created by then :). And it should last until the response is rendered, right?
Yes, it should display the message - the conversation is there inside the PROCESS VALIDATORS phase. You'll have to debug, or file a testcase in jira.
Btw ConverterException should normally be handled as faces messages - you need to mark the converter @BypassInterceptors for them to be passed through unwrapped and so rendered as faces messages.
It probably is related to this issue :).
However, I didn't have @BypassInterceptors, so that I could have some values injected (I had @In EntityManager entityManager). Now that I removed it, I have to lookup the entity manager manually. But how can I do that?
EntityManager entityManager = (EntityManager) Contexts.lookupInStatefulContexts("entityManager");
in the method returns null. And the @In version worked, except for the message.
Ok, found it, Component.getInstance() :)
Thought, even after removing @BypassInterceptors from the converter, the message isn't shown on the exception page.
So I suppose it's a bug, I'll add a testcase to JIRA.