How to create links based on WWSBR_ALL_ITEMS? - Oracle Application Server Portal

Hi,
how can I create a report based on WWSBR_ALL_ITEMS?
I need to emulate the Portal Search feature. Thus I need a
report to query the view WWSBR_ALL_ITEMS. This works all just
fine.
But now I need to embed links for the user to
- click on the folder and navigate there (direct access urls may
do the trick) and
- click on the item and the user opens it.
The problem with the items (text, file, url, pl/sql) is that I
don't know how to create the link.
I've tried several api calls but none really does the job.
Direct access urls will only work for documents, but not for
text items.
So, how is it done?
Thanx and best regards,
~dietmar aust.

You need to construct a call to the wwv_media.show procedure.
This is an undocumented API call (and will likely change in
future releases), but you should be able to figure what
parameters it needs for the different types of items you want to
show.
Regards,
Jerry

Related

Portal Parameter Best Practice

Hi there,
I would like to get suggestions/samples/documention on the best way to use parameters in the portal. My objective would be a way to standardize our approach to Parameters/LOV's for our portal, that would interact with Discoverer Portlets, Omni Portlet, Report Builder Portlet and Form Builder Portlets. We will want to use a mechanism that will allow us to build a dymanic LOV based on SQL, and pass into the page parameters. Our only current solution is that we use a simple parameter form with a static LOV, and pass those to the page parameters, which then pass through to Discoverer. This definitely will not scale. Any direction here would be appreciated.
Thanks,
Tim 
Hi Tim: Here's my basic approach for this -- I create either a portal dynamic page or a stored procedure that renders an HTML parameter form. You can connect to the database and render what ever sort of drop downs, check boxes, etc you desire. To tie everything together, just make sure when you create the form, the names of the fields match that of the page parameters created on the page. This way, when the form posts to the same page, it appends the values for the page parameters to the URL.
By coding the entire form yourself, you avoid the inherent limitations of the simple parameter form. You can also use advanced JavaScript to dynamically update the drop downs based on the values selected or can cause the form to be submitted and update the other drop downs from the database if desired.
Unfortunately, it is beyond the scope of this forum to give you full technical details, but that is the approach I have used on a number of portal sites. Hope it helps!
Rgds/Mark M. 
Hi all,
I have another question:
I have a pdk-java portlet which reads informations about users (user id,department, location etc). This portlet is on a page. It works fine. Now I want to put on the same page other portlets (dynamic pages) in which I use the information read in the pdk-portlet. How can I do this??Please help me!!!
Thanks alot

RE: Parameterized portlets/providers

Version: Portal 9.0.2
I have created a report portlet, based on a SQL query which has a single parameter (:parameter).
In a page, I added two instances of this portlet, each customized with a different value for this parameter, to produce two different reports. That worked fine from my username. However, when I logged in via other usernames to access the same page, the parameter values were not set. I can only presume that the parameter values were set on a per-username basis. However, that's not what I want. I want to set them on a per-page basis, for all users of that page. I don't want to have to customize every such portlet on the page from every user's context, and I don't want to force the user to have to explicitly customize each portlet instance in order for it to show the correct results.
Short of creating two different (but identical) portlets which differ only in their parameter values (something clearly rather unbounded, and certainly undesirable, how do I solve this problem?
Shared wisdom much appreciated...
Regards
Bryan 
Anyone out there who can answer this one?
I'm not sure whether it's considered a trivial question, or a difficult one, but I haven't been able to figure it out.
Thanks to anyone who can help...
Bryan 
Surely this isn't that difficult a question?
Anyone out there?
Thanks!
Bryan 
Hi,
Add a portlet to a page and then click on the Icon Actions next to it ,
Now select the Radio Button "EDIT DEFAULT". the values you specify here would be visible to everyother portal user ,unless he goes to the customize link and overrides these .
Hope this helps,
Thanks,
Anu 
Thanks!
Bryan

upload portlet in portal3.0.7?

my client wants to use a simple upload portlet to do the job which currently need several clicks in 3.0.7, like edit folder, add item, and then choose the item type, etc..., is there is simple one step way to upload a file? those clicks will confuse most of the end users.
thanks. 
You can make a simple portlet after riding DOC on URL http://otn.oracle.com/docs/products/ias/doc_library/ias102/comm.102/a86263/feature.htm#1004906.
Especially pleasant chapter "1.5.4.5 File Upload", but U have to read at lists this entire entire page.
Regards,
Vladimir
null 
In release 3.0.8 (March), we will providing APIs for creating items, folders, and content areas. You could use these APIs to develop a custom portlet for uploading files.
Regards,
Jerry
null

How can a large number of Oracle Reports be managed in Portal

Is there anyone managing more than 50 reports in Portal? The report Portlet functionality is restrictive and does not allow customization. I want to list 50 report names on a page, allow users to select one, enter any runtime paramters and schedule the report, then view/download the results. Are people writing custom user interfaces to manage reports and the output? Portal creates a pl/sql package for each registered report that provides substantial functionality. However, I find limitations that make these package procedures insufficient and the documentation fragmented and imcomplete. 
Jim,
Did you ever try to add Reports portlet as an item, so that user can click on each item to customize/schedule the report? You can have 50 of them, if that is what you really need.
Any reason why you want to create custom user interface, instead of using this vehicle that Portal provided by default?
You mentioned "The report Portlet ... does not allow customization." Actually, it does. You can do it by clicking on the Customize link of the Reports portlet.
Hope this helps,
-Jeff

Link to an item on a different tab

I have a page in which a region is split into tabs. Each tab (Customer, Internal, Vendor) contains custom item types made form the standard file item type with some added custom attributes. A different user group has access to each tab (i.e., customers can only see their tab and vendors can only see their tab).
I need a remedy to handle the situation if one of the files on the "Customer" tab needs to be viewable by a vendor. I would prefer to not simply copy the file to both tabs due to the risk of having the file versions get out of sync if one is updated. Is there a way to make an item link that will link to the original file on the customer tab from the Vendor tab?
I tried with a URL link and that seemed to work, but it is kind of ugly to train my users since you have to manually get the URL associated with the file you are trying to link to. Is there anything in 9.0.2 that will enable users to essentially make a shortcut to an item on another tab? 
There is currently no "picker" for items like there is for pages. There are some other things you can consider:
1. Attribute the items that you want both vendors and cusotmers to see; e.g. you can use a "Vendor" perspective and a "Customer" perspective. Manage the content on another page and use a custom search portlet to publish items on the tabs that match the perspectives.
2. Use a page portlet to publish content that is applicable to both groups. Again, the content will be managed on a different page and published on your page via the page portlet.
Regards,
Jerry
PortalPM 
Using a component link, is there a way to keep the portlet within each tab-region? The SHOW procedure which executes from a link either opens a new browser window or over takes the main portal page window. 
Thanks for the suggestion Jerry. I started down the path of your item 1 with a slight variation in that the content actually lives in the same page, just on a tab that neither the vendor nor the customer can see. Unfortunately, I ran into a limitation of the custom search portlet. I can get the autoquery by perspective fine, but it is returning items in that perspective from every page in the page group. I need the search to only return items on this specific page.
I saw in another thread on this forum the dreaded 'planned for a future release' on the ability to specify what page to autoquery search in. Can I assume the 'future release' doesn't happen to be 9.0.2.6???
Can you think of anyway to limit this search to just this page? Perhaps something with a new feature of 9.0.2.6 such as the ability to set values using a function call. This approach will work like a champ if I can limit it to just this page. 
The only thing I can think of is a scheduled background job that sets the value of an attribute. The job can query wwsbr_all_items to find items that reside on the page (if the item is on a tab the FOLDER_ID column will refer to the tab, not the container page). Then it can use WWSBR_API.MODIFY_ITEM to set the value of the attribute.
Note that you will need version 9.0.2.6 to do this, as these views and APIs are not supported in 9.0.2.
9.0.2.6 has a new feature that lets you use a function call to set a default value. But you can't pass an attribute value from the item or an environment value such as the current page to the function.
You can use DBMS_JOB to run the background job every few minutes or even every few seconds, if you like, so new items will be published quickly. Or, you could use the default value function call to submit the job to the job queue. The function call is evaluated before the item is written to the database, so the job will have to be delayed by a few seconds to ensure that the item has been committed.
Regards,
Jerry
PortalPM
I think I partially follow you, but have two missing links --
1) Since these docs are all on various tabs, is there an easy way to get the ID of the page rather than the ID of the tab? (It doesn't do me any good to search on that tab, I know the documents are on a different tab of the same page. That's the whole reason I need the search.)
2) Assuming I create the attribute and populate it, how would I get this data to the custom search autoquery? I know I can edit the defaults of the custom search portlet and add the attribute as one to be searched, but how do I set the default value of that attribute in the custom search to the folder_ID of that page? From your comment above, it sounds like I can't use the function call to fill-in the folder_ID and there is no #FOLDER_ID# variable :). Without this ability, I don't see how the attribute helps. What am I missing?
Rgds/Mark M. 
1) The folder_id in wwsbr_all_items is the tab, but you can join to WWSBR_ALL_FOLDERS to get the id of the parent page. If the tab is a subtab, you'll have to do a CONNECT BY query or cursor loop to find the container page (where TYPE_ID = 1, unless you're using a custom page type).
2) If you can add the PAGE_ID as a custom attribute in the item, and populate it as I described, then why can't you just add the query condition PAGE_ID = NNN in the custom search portlet?
Regards,
Jerry
PortalPM 
In reply to your question 2), the problem is that I will have several hundred of these pages and don't my users to have to edit the defaults of the custom search portlet on each page they create.
My goal is to have the default set in the custom search portlet of a template so that as each page is created, the custom search will work on that page.
As an example, I have another page that has a custom search template called "My Documents" that automatically returns any docs posted by the user. I used the #USER# syntax to supply the username without having to customize the portlet for every user. I'm looking for the ability to do something similar with PAGE_ID.
We should be up and running on 9.0.2.6 today so I'll give some things a try.
Rgds/Mark M. 
The custom search portlet can't do that today. You'll have to look at a custom portlet or a PL/SQL item that queries the content repository views.
Your portlet can use the function WWPRO_API_PARAMETERS.GET_VALUE('_pageid',p_reference_path) to get the current page id from the URL.
Instead of a portlet, you can also use a PL/SQL item on the template. The PL/SQL item can use WWPRO_API_PARAMETERS.GET_VALUE('_pageid','a') to get the pageid - the "'a'" acts as a placeholder for the reference_path parameter, which is ignored when called from a PL/SQL item.
Note that the pageid may not appear in the URL in future releases of the Portal, so this approach to getting the pageid may not work. However, it does work as of 9.0.2.6/9.0.4, and some alternative way of getting the pageid will be available in a future release.
Regards,
Jerry
PortalPM
I was heading down the path toward creating a PL/SQL portlet to bring up those items in a page which have a certain perspective. (e.g., display items on the Vendor tab that have the "Vendor" perspective). Prior to coding, I thought I verify that access would not be an issue.
As a first step to test the access, I added an item on the "Internal" tab. Vendors do not have access to this tab. I then added on the "Vendor" tab a URL link to that item. Unfortunately, I discovered that if the item lives on a tab for which the user does not have access, a link to that item does not work. The link returns "Document not found. (WWC-46000)"
Before I head down the path of coding a query of the content repository views, wouldn't the links the query brings up have the same result?
I would prefer to not have to go to item level security to avoid the performance hit, but have not been able to come up with an alternative. Two questions:
1) Are there white papers,etc. that give guidance on how to quantify the performance impact that going to ILS would have?
2) Is it possible to add a "Shared" tab for which everyone has access and enable item level security only on that tab? I assume the performance impact would not be as great if only a portion of the page has ILS??? 
If you're concerned about the impact that ILS has on caching, don't worry. The documentation is incorrect on this - ILS does not disable caching.
However, enabling ILS does disable searching on that page by the PUBLIC user. Searches on an ILS-enabled page will only return results to logged-in users.
ILS can be enabled at the TAB level. But as a simple solution, why not just hide the tab. Content contributors can see it but viewers cannot.
Regards,
Jerry
PortalPM
Great minds think alike?!? I started to write my question as whether I could achieve the same thing by hiding a tab, but our vendor also has the need to add/edit items on their tab. They would then be able to see the hidden tab in Edit mode.
I'll play with the ILS capability on the "Shared" tab and see if that meets our needs. One question related to that: Is there any elegant way to display what users/groups have access to a specific item without going in and looking at that item's properties in Edit mode? It would be nice to look at the 5-6 documents in the shared tab and know which groups (customer, vendor, or both) have access to a given doc.
Rgds/Mark M.
Portal 9.0.2.6 
I assume you only want to show this information to privileged users, correct?
One suggestion - create an item type procedure that checks who the current user is. If the user has Manage privilege on the page, display the ACLs for the item.
The ACLs can be found through the APIs in WWSEC_API. There are a number of ways you can approach this - e.g. use WWSEC_API.IS_PRIVILEGE_AT_LEAST() to check the privilege for the current user, and WWSEC_API.GRANTEE_LIST() to return the list of Grantees.
Regards,
Jerry
PortalPM

Categories

Resources