2 Replies Latest reply on May 25, 2011 2:38 PM by lvdberg

    s:graphicImage Not Displaying Image

    auspal

      I am trying to use s:graphicImage to display a gif or png file but even though the Seam tag seems to find the file the image it is not being displayed.


      Seam 2.0.2.GA  JBoss 4.2.2.GA


      The following JSF tag works:


      <s:graphicImage value="images/img04.gif" alt="image could not be found" />



      But the following Seam tag does not:


      <s:graphicImage value="images/img04.gif" alt="image could not be found" />



      The HTML rendered is:


      <img src="/myappname/seam/resource/graphicImage/org.jboss.seam.ui.GraphicImageStore.-4982848d-119fc74c5dd--7ffd.gif" alt="image could not be found" />



      The issue is the same if I use .gif or .png files. Any help or insight would be greatly appreciated.



        • 1. Re: s:graphicImage Not Displaying Image
          viniciusffj

          Oh man, I get a similar problem.
          I put on value the complete path of my image(that is .jpg) but nothing displays.
          If you known something, put here.
          Thank's

          • 2. Re: s:graphicImage Not Displaying Image
            lvdberg

            Hi,


            Check the location of your page. If you are in /pages/MyPage.xhtml and you want to render someting with a relative path, you need to calculate from the root. So you use a / to indicate the root or use ../ meaning one directory up, or ./ which means actual dir. If you have a fixed image location Always try to refer from it from root of your application, meaning /images/myImage.gif


            Leo