5 Replies Latest reply: Jun 4, 2012 7:51 AM by GhanaApexDeveloper RSS

    How to put PageItems like textbox as placeholders in an image in a region?

    GhanaApexDeveloper
      I have this problem that I am facing in an application that I am building.i have read your article that you presented in the oracle users conference in November 2007 “Steal the Show with Apex” but the problem comes to this.
      a)     I have an image that has placeholders for information display. I would like to distinctly put the page items directly at where the placeholders are in the image. Was wondering how to do this . I have already set the fields for where the placeholders are to be for loading information from the database. The question is this if possible how do I do this.? With this fact that I have edit the region template to put the sample code u see below there
      Thanks hope to hear from you soon thanks
      This is a sample of home the place holder looks like.

      SAMPLE
      ==================
      <div align="left" id="voter_card">
      <table width="448" height="263" border="0" cellpadding="0" cellspacing="0" background="#APP_IMAGES/voter_id_real.jpg">
      <tbody><tr>
      <td height="45" colspan="3"> </td>
      <td colspan="8"> </td>
      <td width="159"> </td>
      </tr>
      <tr>
      <td height="40" colspan="3"> </td>
      <td width="34" align="right" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="25" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="24" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="23" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="20" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="26" align="center" valign="bottom"><strong>PLACE HOLDER 1</strong></td>
      <td width="30" valign="bottom"><strong> </strong></td>
      <td rowspan="6" valign="top"><table width="133" border="0" cellspacing="2" cellpadding="0">
      <tbody><tr>
      <td width="42" height="28"> </td>
      <td width="42"> </td>
      <td width="41"> </td>
      </tr>
      <tr>
      <td height="158" colspan="3" align="center"><img src="../gvive_java/gvive_imgs/61/22081761000.jpg" width="124" height="143" alt="Photo"></td>
      </tr>

      </tbody></table></td>
      </tr>
      <tr>
      <td height="36" colspan="3"> </td>
      <td colspan="8" rowspan="3" align="center" valign="bottom"><span class="style5">PLACE HOLDER 1</span></td>
      </tr>
      <tr>
      <td width="53" height="31" align="right" valign="middle"><strong>2</strong></td>
      <td width="7"> </td>
      <td width="23" align="left" valign="middle"><strong>1</strong></td>
      </tr>
      <tr>
      <td height="24"> </td>
      </tr>
      <tr>
      <td height="19" align="right" valign="top"><strong>M</strong></td>
      <td height="19"> </td>
      <td height="19"> </td>
      <td colspan="8" align="center" valign="bottom"> </td>
      </tr>
      <tr>
      <td height="51" colspan="3"> </td>
      <td height="51" colspan="8" align="center" valign="middle"><strong>PLACE HOLDER 1 </strong></td>
      </tr>
      <tr>
      <td height="5" colspan="12"> </td>
      </tr>
      </tbody></table>
      </div>


      Hope you have an idea of what I am saying, please feel free to respond for further clarification,
      Thanks
        • 1. Re: How to put PageItems like textbox as placeholders in an image in a region?
          VC
          if you know what items to use in each td/PLACE HOLDER then just create a HTML region and put your above code into that with replacing the PLACE HOLDER with apex item names
          , you could use the below syntax to render the page items value in HTML
          here X represents the page number of the item
          
          &PX_ITEM_NAME.
          so your HTML region source will be something like
          <table width="448" height="263" border="0" cellpadding="0" cellspacing="0" background="#APP_IMAGES/voter_id_real.jpg">
          <tbody><tr>
          <td height="45" colspan="3"> </td>
          <td colspan="8"> </td>
          <td width="159"> </td>
          </tr>
          <tr>
          <td height="40" colspan="3"> </td>
          <td width="34" align="right" valign="bottom">&PX_ITEM_NAME1.</td>
          <td width="25" align="center" valign="bottom">&PX_ITEM_NAME2.</td>
          <td width="24" align="center" valign="bottom">&PX_ITEM_NAME3.</td>
          .............
          .............
          • 2. Re: How to put PageItems like textbox as placeholders in an image in a region?
            GhanaApexDeveloper
            Please i would like to know if this code that i wrote can be done using an HTML region with the placeholder for a select statement. if so how??
            • 3. Re: How to put PageItems like textbox as placeholders in an image in a region?
              GhanaApexDeveloper
              Please i would like to know if this code that i wrote can be done using an HTML region with the placeholder for a select statement. if so how??
              • 4. Re: How to put PageItems like textbox as placeholders in an image in a region?
                VC
                I did not understand what exactly you mean?

                are you trying to use the placeholder value coming from Sql Query?

                Then you have to create a report template and create a report using that new Template in the report attributes screen.

                This might help you http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/ui_templt.htm#HTMDB25707

                http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt_att.htm#CHDGABID

                Thanks
                • 5. Re: How to put PageItems like textbox as placeholders in an image in a region?
                  GhanaApexDeveloper
                  To the first question i put across, it works , but the problem now is to load the image that comes with the table into the specific part of the image in question.i chose a Display Image as the page item, the datatype is obviously a blob. would it still hold ?
                  i am selecting this based on another pageitem called search.which searches for a particular ID, wondering how i can do that need help.
                  Thanks

                  Please note that facialimage is the BLOB and its of Display Image pageitem
                  How do i get the database to show it in the placeholder.It doesnt work even if i just do a demo of select the BLob from the database using the Display Image if i has to wait for a parameter.On load of the page there is an error.
                  SAMPLE
                  ====
                  begin
                  select ,facialimage

                  into :P1_IMAGE

                  from voter_v where voterid = :P1_VOTERSEARCH;
                  end;

                  OR
                  begin
                  select voterid,fullname,sex,facialimage

                  into :P1_VOTERID,:P1_FULLNAME,:P1_SEX,:P1_IMAGE

                  from voter_v where voterid = :P1_VOTERSEARCH;
                  end;

                  Edited by: TopNedd on 04-Jun-2012 05:51