Panels and Output

Version 5

    RichFaces FAQRichFaces Components FAQ


     

     

    How to organize wizards using the <rich:modalPanel> component?

     

        There are lot of use-cases where the popup should have wizard like behavior. In the VCP 2.0.1 library there was the DialogWindow component designed for such cases. But it was redesigned from the scratch because of many usage issues from customers.

         The modalPanel component now is more flexible and simple for usage. But the question is in organization of wizards using the component.

         The answer is inside <rich:modalPanel> and <a4j:include> components combination. The <a4j:include> component allows to perform Ajax navigation inside included page. To read more about it, explore Rich Faces Guide.

         Thus, one need just put include inside the modal panel and perform navigation inside it as shown in the simple include examples.

     

    Why image generated by mediaOutput/paint2D not updated via ajax?

     

         Frequently it happens for the cases when the components used to show some thumbnails for exampel after files being uploaded or for any other similar cases. If some images was already shown and then changed and reRendered - nothing gets updated. The reason is that media output has no value defined or defined with the same object (for example dataTable rowIndex) and do not have any params which changed between requests. So img element generated has the same src definition between requests. cacheable="false"  only prevents server-side caching, but in this case just browser decides that image not changed and got it from client side cache. So in order to solve that problem - developers should add some parameter to fileUpload which will be changed between requests. For example it could be timestamp as richfaces-demo sample shows. We plan to add some handling for that in future by adding some random prefix to url of generated resource on our own.