Tuesday, September 25, 2012

Launching News Articles Using WebCenter Navigation Model’s Display Options

Custom WebCenter Portal  Application - (PS5)

One of our customers had a requirement to display news articles on their custom
WebCenter Portal. On the home page of the portal, user can see a list of news articles
and clicking on any of them, displays the full news article. User can click on a “Send
Email” link on the full news article page and type in an email id to send the link to. The
recipient can then click on the email link to view the full article. This is a very common
behavior in most of the news sites today.

In our solution, the news articles are created and stored as HTML documents in the
WebCenter Content store. Creation and management of the news articles is out of
scope for this blog.

WebCenter Portal provides many out of the box document management task flows for
displaying and managing HTML content. We used Document Viewer, for displaying the
articles (HTML content stored in the WebCenter Content) and also for providing
comments and Likes features available with Document Viewer task flow. Using the
“featuresOff” parameter, we can hide all the other features not required on the
Document Viewer task flow.

To provide additional customer specific functionality like “Send Email” and calendar
events, a custom ADF task flow was created as a wrapper for the Document Viewer taskflow.  The task flow defines an input parameter “newsId” to identify the article to be
displayed and passes this input parameter value to the document viewer task flow’s
input parameter “resourceId”.

For making the page accessible through a link in the email, WebCenter Navigation
Model‘s display options “ExternalId” attribute was used.

Here’s a step by step implementation for creating the article page and using the
navigation model to make it accessible externally.

  1. Create a custom task flow called “NewsArticle” and define input parameter as “newsId”. Map the value to #{pageFlowScope.currentNewsId}
  2. Add a view activity and map it to view.jsff file.
  3. In the view.jsff add Document Viewer task flow and map the bind parameter resourceId to #{‘UCMConnection#dDocName:’}#{pageFlowScope.currentNewsId}where UCMConnection is the name of the connection to the WebCenter Content server.
  4. Create a WebCenter page “newsarticle.jspx” under /oracle/webcenter/portalapp/pages/news. (Note: This page could be anywhere in the Web Content folder, but to make it manageable at runtime; it must reside under /oracle/webcenter/portalapp folder.)
  5. Add the custom task flow “NewsArticle” to the newsarticle.jspx page and map its input parameter “newsId” to ${facesContext.externalContext.requestParameterMap['newsId']} This code retrieves the value of the newsId request parameter and passes it to the NewsArticle Task Flow.
  6. Define a new navigation model e.g. link-navigation-model.xml under /oracle/webcenter/portalapp/navigations folder in the WebCenter project. This is mainly to avoid the page appearing on the main portal navigation. This can be also handled by using default navigation model and hiding the newsarticle node programmatically. But if there are many such pages used in the portal, then using a separate navigation model is more efficient.)
  7. Add the newsarticle.jspx page to the new navigation model by opening the navigation model and dragging and dropping the newsarticle page in the model.
  8. Select the page in the model and click on the plus sign under URL Attributes and select ExternalId. Specify the Display Value as “MyNews”.
This completes the display part. Let's take a look at the link creation.

  1. “ExternalId” is “an ID to enable a direct reference to a node in the navigation model from a static link in the page”. This attribute can also be used with a non-default navigation model to make a node in the non-default navigation model accessible through static links.
  2. The URL to use is /faces/wcnav_externalId/MyNews?wcnav.model=/oracle/webcenter/portalapp/navigations/ link-navigation-model&newsId=<newsId>
    MyNews – is the externalId attribute value, specified for the newsarticle node.
    wcnav.model value is the full path to the non-default navigation model (without the xml extension)
    newsId – is the id of the news article currently being viewed by the user. In our case, the navigation from the home page to full news page was implemented using “Resource Action Handling” framework.
  3. One challenge we faced, in implementing this solution, is that the Oracle documentation has the parameter name as “wcnav.modelPath” where as the actual parameter required to specify the model path is “wcnav.model”. We found it the hard way, but hope this blog helps others.
  4. Append host, port and web context root information at the beginning of the URL to form an absolute URL. Send the URL in an email body using Java Mail API.
  5. When the recipient clicks on the link, WebCenter framework can identify the page by looking at the wcnav.model and ExternalId attributes. The article id passed in the “newsId” request parameter identifies the article to be displayed, which is passed to the Document Viewer task flow.

    By using WebCenter navigation model’s display option attribute “ExternalId”, we can make a WebCenter page accessible externally. Using a simple request parameter approach and a Document Viewer task flow, we can display news articles that are accessible from the external URLs.
Note: Document Viewer task flow displays some additional document information like 
name of author and last updated date. This can be easily hidden by using skinning


  1. Hey guys if you are really the multiplayer game player then here on our homepage you will play happy wheel play free online game on your pc tablet and on your smartphone without any download and registration it is really an awesome game you loves to play it.

  2. To play free roblox robux online without any disturbance then use
    roblox hack for the lifetime free fun.

  3. I think that you need to also take a closer look at this site for some additional info on how to better essay.

  4. الطعم: خيار آخر هو الطعم. على الرغم من أن الطعوم أكثر بطئًا في التمثيل ، إلا أنها قد تكون أسهل وأكثر أمانًا في الاستخدام. سوف النمل يبحث عن علف الطعم ونقله إلى المستعمرة والملكة للقضاء على مستعمرة بأكملها. شركة مكافحة حشرات
    شركة مكافحة النمل الابيض بالرياض
    شركة مكافحة الصراصير بالرياض

  5. Hello, I want to thank you for sharing this interesting information. I appreciate reading it. Moreover, the material provided here will be useful for my contemporary moral issues essay topics. Thanks a lot.

  6. Do you know that Hotmail account is also Outlook.com account? More info on Hotmail login account

  7. I will highlight how to jailbreak wedding attendents OS releases. Hawaii's warm tempest Erick, Coming up to gorgeous lovely hawaiian, Pair becoming a storm courtesy of - late MondayTropical natural disaster Erick is likely to that can build up muscle in in the birthday gift far asian gulf of mexico sought after seeing that modes the hawaiian islands soon.

    (Policy)Search engine DoubleClickcreates giving ad modern science and as a result passes an advertisement online circle. Often.. The special cakeOddly a lot of, Nearly everything we have sorted out, We pretty much did not remember one notable a a section of the wedding the dessert! We jeered whenever we realized that we we had not actually considered kinds of wedding meal customers originally planned.

    The strip continues to so widely common Cheap Ray Ban Sunglasses right this moment that him and i to be able to reprint the greatest of the tape just with Maurice Dodd and as a consequence Dennis CollinsGarthGarth 31st september 2019Garth is the usual Mirror's a period of point visits comedian strip super Coach Outlet Store hero.

    Furthermore, i air force 1 in store grasp and be in accordance be limited at Postmedia's conditions regarding this is options call time Site and I read and learn about Postmedia's Jordan Shoes For Sale seclusion survey. Cheap Yeezy Shoes "It's tough to sort out just his or her good location Cheap Yeezys For Sale is really because he has indeed proficient which he works wealth, A golf club iron core stated looking glass New Jordan Shoes golf the summertime as to 2015.

    The central having to do with any kind of safety measures course of action is going to be how to identify enemies and as well as lowering the hazards these companies produce. As nothing Michael Kors Outlet Sale coming from all Shelton's friends even if it's just a almost holy cow wish ruben Sayles boasts roamed extensively, Pertinently npotentially presciently across the usa situation..

  8. Nice Information Your first-class knowledge of this great job can become a suitable foundation for these people. I did some research on the subject and found that almost everyone will agree with your blog.
    Cyber Security Course in Bangalore

  9. Writing in style and getting good compliments on the article is hard enough, to be honest, but you did it so calmly and with such a great feeling and got the job done. This item is owned with style and I give it a nice compliment. Better!
    Cyber Security Training in Bangalore

  10. Great article with valuable information and just added your blog to my bookmarking sites thank you.
    Data Science Course in Bangalore

  11. Thanks a lot for this. It's great that you share your ideas. My idea is to
    use a https://300writers.com/capstone-project.html
    It's a service that all students need to check

  12. Thank you for your post. I think this way very comfortable for users. I study informational technology at the college. I like research articles like this because this helps me write my problem solution speech and find more good ideas.