Question

I would like to display conditionally image in the region header based on output from the procedure. Procedure is returning number from 1-5. Then number needs to be 'injected' somehow to html region : <div style="width: 290px; margin: 0 auto;"><img src="#WORKSPACE_IMAGES#v(':P1_ID').png" width="290"></div>

so output of field :P1_ID will determine which name of the file to display. I am completely lost how I can pass any values on this level of the page. I could try to output whole html through procedure but I am not sure if it is the best solution towards solving this problem.Any help greatly appreciated.

Was it helpful?

Solution

If the item's value is determined before the regions are rendered you can do this:

<div style="width: 290px; margin: 0 auto;">
  <img src="#WORKSPACE_IMAGES#&P1_ID..png" width="290">
</div>

If the item's value can change dynamically on the page (e.g. if the value is updated by a dynamic action), you may need to write some javascript to modify the image source.

P.S. not related to your question, but the correct syntax to access the value in PL/SQL is v('P1_ID') - i.e. :P1_ID is only used where a SQL bind variable is used.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top