0 Replies Latest reply on Jan 14, 2011 12:50 PM by Sebastian Sachtleben

    Image Conversation Problem

    Sebastian Sachtleben Novice


      I have trouble since some days to get a temporary conversation working with displaying images from the hard disk. I have tried several ways to show them but for each image the conversation id will be increased. On my startpage there is a rich:datatable with 20 entries. Each entry shows arround 10 images. The first visit gets the conversation id 1. If I press F5 the next conversation id is arround 202.

      I have figured out that each image produces a new conversation id. This shouldnt be the way to go or? ;)

      My prefered display way was an s:graphicImage:

      <ui:repeat var="file" value="#{inserationSearchAction.getImages(item.id)}" rendered="#{inserationSearchAction.getImages(item.id).size gt 0}">   
           <div style="float: left">  
                <s:graphicImage value="#{file.data}">
                           <s:transformImageSize width="100" maintainRatio="true" />
      <div style="clear: both;" />

      Since s:graphicImage just use some kind of seam build in resource I tried to build my own resource:

      <h:graphicImage value="seam/resource/images/1_0.jpg">

      public class InserationImageResource extends AbstractResource implements Serializable {
      private Log log;
      public String getResourcePath() {
           return "/images";
      public void getResource(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
           // Wrap this, we need an ApplicationContext
           new ContextualHttpServletRequest(request) {
                public void process() throws IOException {
                     doWork(request, response);
      private void doWork(HttpServletRequest request, HttpServletResponse response) {

      I have found out that the new ContextualHttpServletRequest tries to restore the conversation id but Manager.getInstance() shows me the increased conversation id.

      Did anyone run into the same problem or has a solution for me? I cant even find an example where images displayed from the hard disk (not inside the webapp).

      Btw. I'm using a long running conversation to create new inserations. Displaying inside this step the conversation id stays like it should.

      Maybe it could be some kind of miss configuration but where could it be?

      Please help me! Thanks :)