12 May 2012

Referencing substitution strings

Recently some people asked me why I use #IMAGE_PREFIX# substitution string instead of /i/ in my application when I refer to server located files. The reason is quite simple – it’s not always /i/. You can configure your server files path in Home>Application Builder>Application>Shared Components>Edit Application Definition by editing "Image prefix" option.

So it's better idea to use universal:
<script type="text/javascript" src="#IMAGE_PREFIX#jQuery/js/jquery-1.4.2.min.js"></script>

than hardcoded:
<script type="text/javascript" src="/i/jQuery/js/jquery-1.4.2.min.js"></script>

Remember also about difference between three referencing substitution strings:

  • #IMAGE_PREFIX# points to virtual path of server "images" directory (default /i/);
  • #APP_IMAGES# points to static files uploaded with APEX upload utility (so saved in database), that are related to specific application (and only this application can use them);
  • #WORKSPACE_IMAGES# points to static files uploaded with APEX upload utility (so saved in database), that are related to the workspace (any application can use them).

7 comments:

Tyson Jouglet said...

Looks like we know which directory the aggregation uses. I was confused when i read this post from there. :)

Przemysław Staniszewski (Przemek) said...

Yes, I've just noticed that :)

Anonymous said...

Hi,

Could you advice me how to save the APEX4.2 flash chart file (mytest.png) to the Oracle APEX image idrectory ( i.e. http://myserver:8080/i/mytest.png) ?

Regards
Sus

Unknown said...

Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
Best Devops online Training
Online DevOps Certification Course - Gangboard
Best Devops Training institute in Chennai

priya said...

Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
Data Science course in rajaji nagar
Data Science with Python course in chenni
Data Science course in electronic city
Data Science course in USA
Data science course in pune | Data Science Training institute in Pune
Data science course in bangalore

Anu said...


I appreciate that you produced this wonderful article to help us get more knowledge about this topic. devops training in chennai | devops training in anna nagar | devops training in omr | devops training in porur | devops training in tambaram | devops training in velachery

Reshma said...

Amazing post.Thanks for sharing.........
IELTS Coaching in Gurgaon
IELTS Coaching in Delhi