Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To whom it may concern, here is how i solved/worked around it:</p> <p>I went with the fetch-another-page route. Maybe i was too technical or too difficult about it in my op, but in hindsight i think i could've boiled it down to: "retrieve an image blob via ajax and display it". So if that rings any bells for anyone, let me know.</p> <p>Some rectifying too: my images table is a child of the contacts table, as such my FK between those is images.contact_id -> contact.id</p> <p>I've created a new page in my application, and put a form in based on my images table. I only display 2 items of the type 'display image' (a thumbnail and original size), and 2 hidden items, 'ID' and 'CONTACT_ID'. I've removed all that was not necessary: no buttons, no DML-process, no labels, no templates. The automated row fetch process takes as 'primary key' my contact id, so i can call the page with contact_id in the url (so that i won't have to do an extra select to retrieve the correct id in the image table). <img src="https://i.stack.imgur.com/CjHcA.png" alt="Page120: form page for fetching"></p> <p>On the page i need the pictures, i then get the page with the photos on it when required (ie: when the detail icon is clicked and i show my popup). Following piece of code is called within this function (only code 'missing' here is where i call another page process to fetch me contact details in a json format)</p> <pre><code>//page 120 only holds the 2 images for a contact. Due to images being in //blobs and no easy way to dynamically fetch them, i made a small //form with the 2 photos on, and id + contact_id //(contact_id made PK for the ARF-process, since this is what is worked with) //The page is pulled in, and the photos retrieved //htmldb_get does not do the job! It only pulls the page from cache, which isnt what i want // arrays with the arguments and their values for the post var vArgs = new Array(); var vVals = new Array(); vArgs.push("P120_CONTACT_ID"); vVals.push(cid); $.post('wwv_flow.show', {"p_request" : "NULL", "p_flow_id" : $v('pFlowId'), "p_flow_step_id" : "120", "p_instance" : $v('pInstance'), "p_arg_names" : vArgs, "p_arg_values" : vVals}, function(data){ var oContainerSmall = $("#id_photo_container").empty(), oSmallPhoto = $(data).find("#P120_SMALL_PHOTO").attr({"id":"id_photo", "alt":oContact.lastname + " " + oContact.firstname}), oLargePhoto = $(data).find("#P120_LARGE_PHOTO").attr("alt",oContact.lastname + " " + oContact.firstname); $("#large_photo_container").empty().append(oLargePhoto); $("#large_photo_container").css({"display": "block", "visibility": "hidden"}); //Why remove and remake the container? //for some reason i couldn't find out, the image width and height get reset to 0 after // an initial display of the enlarged picture and closing its dialogbox. //I assume it is an apex+css+javascript issue. //The only fix i was able to find was to remove the div and remake a new one. // There have to be some properties set on the div and/or its children through // the closing of the popup dialog (for the larger picture), // which then prevents subsequent calls to get the correct values. $("#large_photo_container").remove(); var oContainerLarge = $("&lt;div&gt;&lt;/div&gt;").attr("id","large_photo_container").css({"display":"block", "visibility":"hidden"}); oContainerLarge.append(oLargePhoto); $("body").append(oContainerLarge); //Hardcoded value here! Adapt when necessary if($("#id_contact_type").val() == "Conference Room"){ var oLink = $("&lt;a/&gt;").attr("href", "#") .click(function(event){ explode_headshot(event, this); }); oContainerSmall.append(oLink.append(oSmallPhoto)); } else { oContainerSmall.append(oSmallPhoto); }; $("#contact_popup").dialog({modal: true, width: 750, resizable: false, title: oContact.lastname + " " + oContact.firstname, close: function(event, ui){ $("#id_photo").attr({"src": "", "alt": ""}); }}); }); </code></pre> <p>I wouldn't call it ideal, but it works, and that's all i need at this time :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload