3 Replies Latest reply on Mar 4, 2011 6:13 AM by Chenna Muppidi

    Retrieve images from database and display in page

    Chenna Muppidi Newbie

      Hello Gurus,
      We have a requirement to retrieve the image from oracle database and display on page. Also need to place a text on the image dynamically when user enters data in the field.


      Thanks in Advance...
      Chenna M.

        • 1. Re: Retrieve images from database and display in page
          Tim Evers Master

          For the first requirement have a google/read about a seam tag.


          <s:graphicImage />
          



          Your second requirement is well too vague to even know where to begin.


          When you put the text on the image, does this text need to be embedded into the image or could you just put a transparent floating div over the image. Alternatively just make the image the background of a div and put your text in the div. Obviously this solution wont allow you to use the s:graphicImage tag in which case you may have to write a simple servlet that will allow you to request images via a url.


          If it needs to be a part of the image then you are probably going to have to start doing some research on your own. Maybe a good place to start is on the richfaces:mediaOutput tag page


          A bit more information about your requirement is really necessary before any real solution can be given.


          Other then that your question seems quite unrelated to Seam so, this may not be the best place to be asking your question.

          • 2. Re: Retrieve images from database and display in page
            Chenna Muppidi Newbie

            ThanQ  Tim...




            first requirement is  solved  u can find  above..


            second  requirement: you said about  second requirement just  make image as a background.. hear  the  challenge is  how  to display background image by  dynamically that  means i want  to bring blob image from  database.  this  image  i want to display as  background  image..


            i did a  researched  so many sites.. but  i did  not any break through.


            could  you  please give  any  clue ..pls

            • 3. Re: Retrieve images from database and display in page
              Chenna Muppidi Newbie

              Thanx Tim,
              Here is greater explanation on the specific challenge:
              a) We bring an Image based on certain conditions, and display in a semi-transparent mode on the Page
              b) Based on other conditions, we permit the User to enter Text or choose additional small images (such as Directions) so all the User Input could be placed on the semi-transparent image obtained in Step (a)
              c) Eventually, when the user is done, we need to save the Image (from Step (a)) and the User Input (from Step (b)) as one unified Image into the DB as a Blob


              Of these, We are OK with Step (b); but we are still struggling with Steps (a) and (c).