APEX by Example - Shared Components (whitepaper)
I posted the whitepaper I presented at Collaborate 07 on my blog.
Title: APEX by Example - Shared Components (in DG Tournament) by Dimitri Gielis
You find it here: http://dgielis.blogspot.com/2007/05/apex-by-example-shared-components.html
Hope you enjoy it,
Dimitri
Dimitri,
I'm looking forward to your presentation at ODTUG in Daytona. Are you planning another meet-up for the APEX crowd at the conference? If so, please keep us informed, as it is great to put names to the faces that you see out on this forum and elsewhere.
Thanks,
Mike Riley
Similar Messages
-
Version Control of APEX Pages and Shared Components
Background:
My organisation has a large customer base and over the last 2 years we have migrating from a forms to an apex user presentation layer. We have had a number of customers live on the apex front end for close to a year now.
Our current method of releasing apex objects is at the application level (ie applications are exported for version control in PVCS and then released to Test etc). We now want to investigate exporting pages and shared components individually. Hence, I have a few questions:
1. If I export a page and this is checked into PVCS and I forget to export a 'List of Values' shared component. What happens when the page in PVCS is created in another environment (ie Test). I guess the ‘Page Import’ would still succeed but the reference to the ‘List of Values’ would be some large made up number.
How would we detect the missing dependency after import ?
2. Regarding New or Changed Templates. Once again, if a page references a new template and is then exported, checked into PVCS and imported into test but the template is missed for migration to test, would the import succeed but the template reference would be broken, like in number 1.
3. How can Application level objects be locked (reserved) when undergoing modification.
Any comments would be appreciated especially if there are any sites using pages and shared component exports for version control and releases.
For anyone who's interested, the method we are thinking of using is:
..Page Export script will be version controlled
..ALL the shared component export scripts will be added to 1 main SQL script
Hence we only end up with 2 configurable objects in PVCS.Nigel,
1. If I export a page and this is checked into PVCS and I forget to export a 'List of Values' shared component. What happens when the page in PVCS is created in another environment (ie Test). I guess the ‘Page Import’ would still succeed but the reference to the ‘List of Values’ would be some large made up number.
For component export/import, the source and target worskpace ID and application ID must be identical. You can achieve the workspace "sameness" by exporting and importing the workspace from one database to another, thus preserving the workspace's numeric ID, aka security group ID. Similarly applications must be exported/imported/installed without changing their IDs in the installed-into instance. More fundamentally, the application you import/install components into must be an identical copy of the source application with respect to the internal object IDs, allowing only for differences that incent you to migrate changes from a higher rev level of the application into a copy that is at a lower rev level.
As to the specific question, if you copied a page but didn't copy an LOV into the target application then if the LOV referenced by the page already existed in the target application then page would simply reference the existing, perhaps down-level, LOV in the application. If the LOV did not already exist but had been newly created in the source application, then the target application page would contain an invalid reference and would produce a runtime error.
How would we detect the missing dependency after import ?
I don't know of any reports that would tell you this. There are several types of omissions that you need to watch out for, not all of which can be detected by inspection of the target application in isolation.
2. Regarding New or Changed Templates. Once again, if a page references a new template and is then exported, checked into PVCS and imported into test but the template is missed for migration to test, would the import succeed but the template reference would be broken, like in number 1.
Yes, same case.
3. How can Application level objects be locked (reserved) when undergoing modification.
There is no provision for this as there is for pages.
For anyone who's interested, the method we are thinking of using is:
..Page Export script will be version controlled
..ALL the shared component export scripts will be added to 1 main SQL script
Hence we only end up with 2 configurable objects in PVCS.
So you propose to have one script of all pages and another script for everything else? I'm not sure I got that right.
Scott -
Shared Components APEX Report Query and Layout
Does anyone know how to call the report query and layout from the Shared components section from a page within the application?
mtbdude40 wrote:
What I need is this: The ability to create a PDF report with a custom header defining the data (example - select * from emp where deptno = :deptno and the header includes the department name).
I use this white paper as my source: http://www.oracle.com/technetwork/developer-tools/apex/learnmore/custom-pdf-reports-1953918.pdf
You need to build and use a Shared Resource -> Report Queries.
The Report Query will have two queries associated with it (see below).
one query will be for the header information, the other will be for the data.
use the "download" of the "xml data" as your source for Altova/other tools.
If you add/remove/change queries, You'll have to redo your report (from scratch) as that changes the XML Schema required. (at least, with my experience)
Once you get the hang of it, 2x queries is easy (Header, data)
I've experimented with 3x queries (header, master,details) but have been unsuccessful. I have some ideas though ("link" master->detail info via XPath stuff within Altova) but haven't gotten around to testing it.
If you want to run the report for multiple departments....That might require some finesse.
Unfortunately, the Source of the Queries can't be a scalar SQL that returns 1 row of 1 column of data type XMLType....
MK -
Can shared components be shared among different applications within APEX
Can shared components be shared among different applications within APEX ?
-Louis Rosa
Florida Center for Library Automation (FCLA)
Gainesville,FLNot entirely true.
Some like LOVs, Authorizations, Authentications can be shared amongst applications in the same workspace.
Varad -
Shared components between applications
There are ways to create shared components between applications?
Example:
menu list shared between multiple applications.
Version Apex: 4.0.1I would seriously question why you want to export pages from dev to qa or qa to prod. Why you are NOT looking at using a version control system and exporting from that to the different environments would be a good question to tackle...
Anyone who use the approach of copying pages between environments is just asking for trouble, since there WOULD and Could be the chance of NOT migrating all changes between environments that have occurred between versions..
I for one would be VERY leery of such process, and have dealt with a shop like this.. Glad I am NOT There anymore..
Thank you,
Tony Miller
Ruckersville, VA -
Issue with Shared Components - Report Layouts Download
After my isp provider upgraded from APEX 3.2.1 to 4.0, I am now unable to go into the Shared Components -> Report Layouts section and access an existing report to download my rtf template. Is there another way to go and get this out of the database. I need to update a report layout that is old and I do not have a backup of the original report and do not want to spend the time to recreate.
Thanks,
MarkIf you have TOAD, or if you can install it, by connecting to your database you will be able to access your report layout via the Schema Browser. The whole path should be "All Schemas -> APEX_040000 -> Tables -> WWV_FLOW_REPORT_LAYOUTS". In that table you will find you report layout. Double click on it and copy/paste it into a text editor.
Note: You might need to be granted some rights to access the 400+ tables of the APEX_040000 schema. Or if you have a DBA, ask him to do this for you.
Of course, if you don't want to install TOAD, I bet you could query that table from the SQL Commands of the SQL Workshop, but you would again need the rights to access said table.
Best regards,
Mathieu -
Images uploaded in Shared Components not displaying
We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error.
The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do not show on screen. An entry is available in the report on the Images page but the image itself is blank. The URL of the image is shown as : "+http://hostname:port/apex/wwv_flow_file_mgr.get_file?p_security_group_id=100000&p_flow_id=100&p_fname=Sampleimage.jpg+". The image is available in the wwv_flow_file_objects$ table and can be viewed through the BLOB_CONTENT column. But it is not visible in the front end.
Is there a solution to this issue?
Thanks,
AniketAniketP wrote:
We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error.
The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do not show on screen. An entry is available in the report on the Images page but the image itself is blank. The URL of the image is shown as : "+http://hostname:port/apex/wwv_flow_file_mgr.get_file?p_security_group_id=100000&p_flow_id=100&p_fname=Sampleimage.jpg+". The image is available in the wwv_flow_file_objects$ table and can be viewed through the BLOB_CONTENT column. But it is not visible in the front end.Is the image associated with an application (No Application Associated)? If not then consider using the #APP_IMAGES# substitution istring nstead of #WORKSPACE_IMAGES# -
Direct Link to Report layout in Shared Components
Is it possible to put a link on my page that goes directly into the Shared-Components- Report Layouts? I do'nt want my developer users to have to open up the builder to create/upload new (.rtf) Report Layouts.
Yeah
It's
http://host:port/pls/apex/f?p=4000:1400:&APP_SESSION.With the normal substitutions for your setup and removing pls if your using EPG.
Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;) -
How to Clear Cache for an Old Static File in Shared Components
Hello,
I am using Apex 4.1.1.00.23, HTTP Server with mod_plsql, and Oracle Database 10.2.0.5.0.
My situation is as follow:
I have a CSS static file in the shared components that is used in different applications. I recently modified the CSS file, but the changes are not reflected in my applications.
I tried clearing the cache of my browsers, deleting the file from shared components and creating a new one with the same name, and nothing is working.
Using Firebug, I can see that the file used in my pages is the old version of it. Anyone can tell me if the server is caching the file and how can I clear it?
Thank you for your help,
ErickWhat kind of document is it (e.g. is this a parsed
HTML file, or a static file)? have you adjusted your
cache settings with the nsfc.conf file? have you
enabled the nsfc report? Are the files stored on NFS
volumes?
Regardless, you can force the cache to be flushed by
enabling the nsfc report, and then accessing the URI
like so:
/nsfc?restart
See the Performance and Tuning Guide:
http://docs.sun.com/source/817-1836-10/perftune.html#w
p17232I tried to to do this. Did n't worked. /nsfc?restart is not working for me. I have IPlanet 6.1 Webserver version. Without having any backend server running, I am getting JSPs displayed from cache!! Please help me out. -
Non-application specific static files not visible in shared components
Hello,
We recently upgraded to APEX 4.0.2.00.07. In the past we have uploaded a number of static files with no specific application linked to them.
Now, when I search on these files using Shared Components -> Static Files, I don't find them back.
But, if I directly query the view APEX_WORKSPACE_FILES (using the APEX schema owner), I see all the files. They have APPLICATION_ID = 0 and APPLICATION_NAME is empty.
Is this a bug? I couldn't reproduce this with newly added static files, whether I specify an application or not.
Matthias
Edited by: mhoys on Mar 1, 2011 11:40 AMOwen:
Excellent idea/perspective...I did not think of that. Each of our forms/screens has a seperate class file. Each class file has a CreateForm() routine that is called when an instance of the class is intiated behind the menu selection.
Here is a block of code In Main.vb I use to execute a menu selection:
Case "MPA"
'8/30/07 EJD - Work Order Parameters Screen
If GetFormCount(G_MPAMaint_Form_Type).ToString = "0" Then
Dim MPAForm As New MPA
BubbleEvent = False
Else
UpdateStatus("Another MPA maintenance screen is already open", SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
End If
So, I can utilize this code in the case statement where I was doing the ActivateMenu if I hear you right. Now, can you help me with how I would pass the
variables instead of making them Public Shared in the Main class? Or is it ok to expose them that way?
I Appreciate the help,
Ed -
Report Query wizard error (in Shared Components)
I have been following the <a target="_window" href="http://www.oracle.com/technology/products/database/application_express/howtos/howto_master_detail_pdf.html">How-To Create a Master-Detail PDF Report</a><br>
<br>
I'm using Apex 3.01 and Firefox 2.0.0.7<br>
<br>
When I have to create a Report Query in the shared components, I get through the wizard to the Create Report Query Layout page and for some reason, the Previous and Next buttons don't work. The only button that works is the Cancel button.<br>
It seems to happen after I've downloaded the sample XML file from that page.<br>
I've also noticed this happens when you go in to edit an existing Report Query and take a download of the XML...<br>
On closer inspection it seems to be the buttons that have onclick="javascript:doSubmit..." behind them that don't work. Buttons with javascript:confirmDelete seem to still be active and work ok.<br>
<br>
But, the problem doesn't happen in IE7.<br>
<br>
I found this happened on both my local installation and on my apex.oracle.com instance.<br>
<br>
Has anyone else had this behavior or is this some dodgy local setting I have wrong?<br>
<br>
Gus..<br>Hi,
This is posted in the wrong forum. This forum is for Oracle Berkeley DB. Please find the correct forum and post your question there.
Regards,
Alex Gorrod,
Oracle Berkeley DB -
Shared Components - Comments - which View?
I am trying to find which APEX view holds the field for Shared Components - Comments. On the Shared Components page, there is a COMMENTS link. Which APEX view stores those comments? It seems like it would be stored in APEX_APPLICATIONS view, but i don't see the comments field there.
Thanks for your help,
JohnHi,
A useful query to know which views have comment column is the following:
select apex_view_name, column_name from apex_dictionary where COLUMN_NAME LIKE '%COMMENT%';
APEX_VIEW_NAME COLUMN_NAME
APEX_APPLICATION_AUTHORIZATION COMPONENT_COMMENT
APEX_APPLICATION_BC_ENTRIES COMPONENT_COMMENT
APEX_APPLICATION_BREADCRUMBS COMPONENT_COMMENT
APEX_APPLICATION_BUILD_OPTIONS COMPONENT_COMMENT
APEX_APPLICATION_COMPUTATIONS COMPONENT_COMMENT
APEX_APPLICATION_GROUPS GROUP_COMMENT
APEX_APPLICATION_ITEMS COMPONENT_COMMENT
APEX_APPLICATION_LISTS COMPONENT_COMMENT
APEX_APPLICATION_LIST_ENTRIES COMPONENT_COMMENT
APEX_APPLICATION_LOVS COMPONENT_COMMENT
APEX_APPLICATION_LOV_ENTRIES COMPONENT_COMMENT
APEX_APPLICATION_NAV_BAR COMPONENT_COMMENT
APEX_APPLICATION_PAGES PAGE_COMMENT
APEX_APPLICATION_PAGE_BRANCHES COMPONENT_COMMENT
APEX_APPLICATION_PAGE_COMP COMPONENT_COMMENT
APEX_APPLICATION_PAGE_PROC COMPONENT_COMMENT
APEX_APPLICATION_PAGE_REGIONS COMPONENT_COMMENT
APEX_APPLICATION_PAGE_RPT COMPONENT_COMMENT
APEX_APPLICATION_PAGE_RPT_COLS COLUMN_COMMENT
APEX_APPLICATION_PAGE_VAL COMPONENT_COMMENT
APEX_APPLICATION_PAGE_BUTTONS COMPONENT_COMMENT
APEX_APPLICATION_PAGE_ITEMS COMPONENT_COMMENT
APEX_APPLICATION_PARENT_TABS COMPONENT_COMMENT
APEX_APPLICATION_PROCESSES COMPONENT_COMMENT
APEX_APPLICATION_SHORTCUTS COMPONENT_COMMENTS
APEX_APPLICATION_SUPP_OBJ_BOPT DEVELOPER_COMMENT
APEX_APPLICATION_TABS COMPONENT_COMMENT
APEX_APPLICATION_TEMP_BC COMPONENT_COMMENTS
APEX_APPLICATION_TEMP_BUTTON COMPONENT_COMMENT
APEX_APPLICATION_TEMP_CALENDAR COMPONENT_COMMENT
APEX_APPLICATION_TEMP_LABEL COMPONENT_COMMENT
APEX_APPLICATION_TEMP_LIST COMPONENT_COMMENT
APEX_APPLICATION_TEMP_PAGE COMPONENT_COMMENT
APEX_APPLICATION_TEMP_POPUPLOV COMPONENT_COMMENT
APEX_APPLICATION_TEMP_REGION COMPONENT_COMMENT
APEX_APPLICATION_TEMP_REPORT COMPONENT_COMMENT
APEX_APPLICATION_TRANSLATIONS DEVELOPER_COMMENT
APEX_APPLICATION_TRANS_MAP TRANSLATION_COMMENTS
APEX_APPLICATION_TRANS_MAP TRANSLATION_MAP_COMMENTS
APEX_APPLICATION_TREES COMPONENT_COMMENTRegards, -
Translate report layouts (Shared Components)
Hi,
I create in my application PDF using shared components (Report Queries and Report Layouts) and the BI Publisher. The queries I have deposited in Report Qieries and templates in report layouts. The call is done via the URL (which appears in the report query). Now I have translated my application and see that the titles of my templates are not visible with the xlife file. How can I translate the report layout from the Shared Components.
Thank you in advance for your support.
InesSruthi Tamiri wrote:
1. Apex version#3.2
Out of date and unsupported...please consider upgrading.
2. IE# 6+
Are you really still trying to support IE6?
When i clik on that specfic tab which is time causing, in that screen contains
1. Popup screens
2. Text items
3. List items
We have tried to this option from toad to check which Query is cauisng the problem, but nothing query is running in back end to tarce what could be exact problem
In toad#9.2 version we have option as Database->Monitor>Session Browser [where we can see which query is running under specfic session]
To establish exactly where time is being spent, use Debug mode to identify APEX or database issues, and timeline/profiling developer tools in the browser to check for network or JavaScript problems.
What web server are you using? If you're using EPG check the SHARED_SERVERS configuration. -
Absent images in shared components
I can't see list of images in "Shared Components > Images", but wget http://10.20.50.77:7777/i/16admin.gif return current image from apex/image directory. Where I can see what is wrong?
APEX 3.2.1
ORACLE XE
Standalone Oracle HTTP Server (Apache2)
dads.conf:
Alias /i/ "/home/apache1/data/data/apex/images/"
httpd.conf:
Alias /i/ "/home/apache1/data/data/apex/images/"
<Directory "/home/apache1/data/data/apex/images/">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Edited by: lvccgd on 24.02.2010 1:21Hello,
The images in Shared Components -> Images are ones you have uploaded specifically for your application (or workspace). They are unrelated (strictly speaking) to the images in the /i/ folder (which are either stored on the filesystem if you use the OHS or stored in the DB if you use the EPG etc).
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
Referencing CSS from Shared Components/Cascading Style Sheets
Apex 4.0
I've been placing my CSS style sheet in Shared Components/Cascading Style Sheets. And referencing it as follows <link type="text/css" rel="stylesheet" media="screen" href="#WORKSPACE_IMAGES#app300.css">.
For weeks all has seemed to work fine. I make changes to app300.css in Cascading Style Sheets. Clear cache. And see my change.
But suddenly it stopped working. More specifically my updates don't take. I firebug and look at the file under CSS and don't see my changes. app300.css is unchanged. Then I deleted app300.css from Shared Components/Cascading Style Sheets. The file is deleted. No longer in the Cascading Style Sheets panel. But the old file still appears when I look under firebug.
Simply a brain cramp for me. I know this is probably obvious but I can't figure it out.Hi,
If your file still recides in the database, you might want to try deleting it with a procedure from the wwv_flow_api package:
set serveroutput on
declare
l_security_group_id number;
begin
select workspace_id into l_security_group_id
from APEX_040000.APEX_WORKSPACES;
wwv_flow_api.set_security_group_id
(p_security_group_id => l_security_group_id);
wwv_flow_api.create_or_remove_file
( p_name => 'app300.css'
, p_location => 'WORKSPACE'
, p_mode => 'REMOVE'
, p_type => 'CSS'
commit;
end;
You can run this using SQL developer/ Toad or whatever program you use, but I don't think you can run in the SQL workshop of Apex.
Run it as workspace owner.
First part sets the apex engine to point to the correct workspace id in Apex, change "APEX040000" to match your version of Apex.
Second part is the procedure that should remove your file from the database.
Make sure you commit your changes and try to upload your css file again.
Regards,
Vincent
http://vincentdeelen.blogspot.com
Maybe you are looking for
-
SharePoint 2013 Reporting Services Error activating ReportingWebService.svc
I get below error when i tried accessing System Settings after creating Reporting Services Service Application in SharePoint 2013, looked in to many blogs but didn't find any fix tried https://social.msdn.microsoft.com/forums/sqlserver/en-US/c2066c96
-
Using Photoshop Elements 6 with iPhoto 09 won´t update miniatures
Hi there - I´m a newbie and a recent switcher from Windows and Linux so please be gentle with me if I´m asking silly questions... I want to use iPhoto to organize my photos and Photoshop Elements 6 (by now the trial version if that matters) to edit m
-
attached is the lvm file
-
I have looked on forum pages on how to search a topic. For the life of me I can not find it. The only one I see is at the very top, which takes me out of forums.
-
I have a Hp Pavilion 17 Notebook PC, when I first began using it the touchbad would not work. Is it suppose to automatically begin working? or do I need to turn something on to make it work? Thank you.