When someone hits this submit button, I need my rich:tree to be reRendered with the new values. The actionListener does reload the tree with values, but it is not reflected on the page for some reason, unless I hit the submit button a second time.
Is there anything else I can do? What can I do to make my rich:tree reload with values and show those new values on my page as soon as the submit button is pressed?
Or is there something I can do to monitor the tree List, and if the values in that List change it automatically reloads the rich:tree with the new values?
There has to be some way to do this, the devs had to have made a way to do this, it seems like a basic need.
First action event fires and all listeners are notified, then re-rendering occurs. You can't reverse this order anyhow either as you can't reorder JSF phases.
Thats what I thought, it seemed like the logical order.
But does this mean that it notifies the listeners, and then reRenders before the listener methods have completed? This seems like what is happening. My listener method begins to run, but this method takes 3-6 seconds to complete.
Is there any way I can tell the reRender to wait until the actionListener is totally complete before it ReRenders the page?
You are not right. Execution of all listeners is complete before re-rendering occurs.
So if my actionListener calls a method that reloads my List with the new projects, this method will complete first, and then the tree will get reRendered right?
This is exactly how I have it set up though, but for some reason, the method gets called and completely loads the list with new project values, and then the tree is reRendered because I see it briefly disappear and re appear. But for some reason it is still using the values from the old projectList and not the values that were just loaded in by the method called by the actionListener.
Any idea why this may be happening?
Are requests happening in parallel? Do you start some king of asynchronous processing from your action method?