Upload an image through the <rich:fileUpload> component.
Display the image through the <a4j:mediaOutput> component.
The image will be displayed as soon as it is uploaded.
Each time the image is uploaded the contents of the display components will be changed accordingly.
My try for accomplishing the scenario is attached with this question.
The problem is that, at the first time the implementation works as the expectation but when the second image is uploaded then all of the components are updated accordingly except the <a4j:mediaOutput> component - it is not updated with the latest image. I have examined the code behavior and I have identified that even the createContent method is not also invoked in the second request. But the <a4j:mediaOutput> component is updated when I have refreshed the page entirely. What is the problem? Or what is the problem in my implementation? Do you have any alternates?