4 Replies Latest reply: Aug 22, 2013 10:26 AM by Mike Kutz RSS

    Radio group with URL for image in a table

    Mike Kutz

      I'm trying to display some text and an image for a radio group so the form looks like

      (*) text for item 1 {image for item 1}

      ( ) text for item 2 {image for item 2}

      ( ) text for item 3 {image for item 3}

       

      I've found these:

      Re: Is it possible to display an image instead of button in a radio group?

      How to show image in radio group ?

       

      It looks like all I have to do is create a LOV that looks like:

      SELECT {complex stuff that generates the text string, img tag, and URL for image}

        ,DB_PK

      FROM dynamic_view_for_lov -- public synonym

       

      But, my images are stored in a table.

       

      I have been able to create an IR using the "Column Format=BLOB" method.

      The SQL for the report looks like:

      select

        db_pk, display_text, image_len, image_clob

      from dynamic_view_for_lov -- public synonym

       

      And the Number/Date Format for the IMAGE_LEN column is:

      IMAGE:DYNAMIC_VIEW_FOR_LOV:IMAGE_BLOB:DB_PK::::::Inline:Download

       

      My question:  How do I create the URL for the img tag for the LOV?

       

      many thanks

       

      MK

        • 1. Re: Radio group with URL for image in a table
          fac586

          MikeKutz wrote:

           

          My question:  How do I create the URL for the img tag for the LOV?

          Use the apex_util.get_blob_file_src API method.

          • 2. Re: Radio group with URL for image in a table
            Mike Kutz

            I think Homer Simpson said it best:  Doh!

             

            For the person in the future, you have to 'fake create' the Automated Row Fetch process.

            The get_blob_file_src gets all the information from that Process and the column name of the Item Type that is on the same page.

             

            I forgot where I read about that trick.

            Basically, you create the Automated Row Fetch process, then 'disable' it.

            Same thing with the required Item Type.  Create it as a "File Type", just to tell APEX that it comes from a Database Column,.... then change it to a 'hidden' type.

            • 3. Re: Radio group with URL for image in a table
              fac586

              MikeKutz wrote:

               

              I think Homer Simpson said it best:  Doh!

               

              For the person in the future, you have to 'fake create' the Automated Row Fetch process.

              The get_blob_file_src gets all the information from that Process and the column name of the Item Type that is on the same page.

               

              I forgot where I read about that trick.

              Basically, you create the Automated Row Fetch process, then 'disable' it.

              Same thing with the required Item Type.  Create it as a "File Type", just to tell APEX that it comes from a Database Column,.... then change it to a 'hidden' type.

              You don't have to "fake' it if the application already contains the file upload item and ARF. The assumption is that the application will contain these components in order to maintain the BLOBs and you'll just reference the functional ones.

              • 4. Re: Radio group with URL for image in a table
                Mike Kutz

                fac586 wrote:

                 

                You don't have to "fake' it if the application already contains the file upload item and ARF. The assumption is that the application will contain these components in order to maintain the BLOBs and you'll just reference the functional ones.

                That's just it.

                The BLOBs can't be maintained directly.  They're in a proprietary binary format used by a 3rd party data cartridge.

                The images are actually generated on-the-fly.