Hi all, I use Tomahawk + Facelets + Trinidad + Ajax4jsf and I need to render blob contents retrived from a database, according to the suggestions at
http://jroller.com/page/cagataycivici?entry=phaselistener_renders_an_image_no I use a phase listener to retrieve contents of blobs to render within an iframe (or object) tag. This occurs by means of a second request, originated from a generated URI ending up in .faces, which I can parse within the listener. This leads to a request-scoped bean holding blob contents. Now this second request implies a target view which is not the original one (when the URI was rendered). Thus - although my bean is properly recreated - it will miss any state which I saved by means of t:saveState. This implies missing all context info to retrive blob contents from. I can figure out a number of tricks to save/restore bean state manually, by means of a session-scoped bean and alike. But before I will follow this way, I wonder if anybody can suggest a cleaner way to pick up the saved state of my bean from its original view (the first request). All I have is the second request URI where I can store any key/code pointing to some session-bound data, which I can use to retrive my blob from. A simple solution could be achieved by: serialize bean state, place result into a session-scoped map, and place the related key within the URI. Then do the opposite from the phase listener to restore bean state, then retrieve blob contents from the bean. Anything better ? Thanks -- Renzo

