-
1. Re: Add FacesMessage from java thread
bleathem Oct 17, 2013 4:48 PM (in response to miguel0afd)When you launch your own thread, the JSF lifecyle will carry on processing independent of your thread. Rather, if you want to create a Faces Message from a separate Java thread try using RichFaces push (the a4j:push component).
-
2. Re: Add FacesMessage from java thread
miguel0afd Oct 18, 2013 1:19 PM (in response to bleathem)I forgot to mention that I already try to solve it with the a4j:push component but the problem is that others ajax components stop working:
main.xhtml
... <h:form> <a4j:push id="pushJms" address="pushTopicsContext"> <a4j:ajax event="dataavailable" render="testsSimplyTable" /> </a4j:push> </h:form> ... <h:form> <h:panelGrid /> <a4j:commandLink value="Main" action="#{userBean.change('Main')}" execute=@form render="generalPanel" /> <a4j:commandLink value="Test" action="#{userBean.change('Test')}" execute=@form render="generalPanel" /> </h:panelGrid> </h:form> ...
In this case, both a4j:commandLink components don't work while the a4j:push component is waiting for a dataavailable ajax event
-
3. Re: Add FacesMessage from java thread
bleathem Oct 18, 2013 1:22 PM (in response to miguel0afd)In that last code sample it looks like you might be trying to do ajax updates across multiple forms. This is a currently known limitation of JSF:
https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790
Try putting your push component in the same JSF form.