Sunday, August 14, 2011

Further Customizing WebCenter PS3/PS4 RSS Task Flow - RSS Items List

I have received request from blog reader, based on my previous blog post - Extending WebCenter 11g PS3/PS4 ADF Task Flows - RSS Example. Standard WebCenter PS3/PS4 RSS task flow is missing one very important property - number of RSS items to be rendered in the list. Request was about how to add such property and extend existing RSS task flow.

Download sample application, it extends WebCenter RSS task flow through seeded MDS customizations and provides ability to specify number of RSS items to be rendered - EnterprisePortalApp_v6.zip.

There is no option to add new RSS task flow parameter with seeded MDS customization, so we should follow different approach. What we can do is to append RSS feed URL with number of RSS items we want to render. I will describe below, how to customize standard WebCenter RSS task flow, in order to be able to append this property to RSS feed URL. For example, if we want to render 3 items, we will append ?rss=3:


For 7 items, append ?rss=7:


For 10 items, append ?rss=10 and so on:


Two RSS feeds are rendered, using extended WebCenter RSS task flow, different number of RSS items (3 and 7 as it was defined above):


Another RSS view, with 10 items as defined above:


How we can extend WebCenter RSS task flow? For basic steps and JDeveloper configuration, follow this blog. Once you understand basic steps, we can move forward. Let's define managed bean in request scope, it will act as RSS helper bean and will be used to parse RSS feed URL:


This bean defines two methods. GetRSSFeedLocation() method is to parse RSS feed URL and remove all custom parameters - otherwise original WebCenter RSS task flow functionality will not work. GetRSSItemsNum() method is to retrieve number of RSS items to be shown:


Once we have our custom methods in place, as per previous blog post - ensure that seeded MDS customizations are enabled:


Switch to Customization Developer mode, we will modify WebCenter RSS library:


Make sure site level customization context is enabled:


First customization we should apply is for RSS link:


Make sure that RSS destination is set to point to RSS feed location retrieved from our RSS helper bean:


In order to control how many items we want to show in RSS list, we should change original RSS task flow implementation and switch af:table component with af:iterator:


Make sure that Rows property for af:iterator point to our RSS helper bean method - it will parse RSS feed URL added parameters and return how many RSS items should be shown:


Page definition for RSS viewer, contains method which constructs RSS items list. RSS feed location URL must be changed here as well to point to custom RSS helper bean:


In order to review applied customizations, you can go to ADF Library Customization package and expand it:


You will see applied customization for page definition file of RSS viewer, RSS list construction method:


RSS viewer UI customizations are stored in MDS as well - table switch with iterator:


RSS link customization, to retrieve RSS feed URL from custom RSS helper bean:


13 comments:

Guillaume said...

I hope to use this post as a guide to modify the navigation taskflow.
What we need is a nav menu bar with big icons and text title underneath. I initially thoughts this might be a skin modification but it seems like the ADF components were not flexible that way.

Let me know if you're interested in working on this also.

Cheers.

Andrej Baranovskij said...

Hi,

I would recommend to add navigation programmatically, not to use provided WebCenter navigation task flows (those are suitable mostly for testing).

Refer to this guide, how to visualize WebCenter portal navigation: http://download.oracle.com/docs/cd/E21764_01/webcenter.1111/e10148/jpsdg_view_comps.htm#CIHFGDBA

Andrejus

Anonymous said...

Hi excellent article,but when i open in jdev customization mode all files under rss viwer are locked
One most important requirement is how do we implement pagination on rss items?
can you show some light on it....?

Andrej Baranovskij said...

Even it shows files locked, still you can modify properties through Expression Builder.

For pagination implementation you can refer to this post: http://andrejusb.blogspot.com/2011/05/oracle-adf-11g-custom-table-pagination.html

Andrejus

kans said...

thanks andrejus great post...
all files under rss viewer are locked.however seems its tricky to integrate adfpgination and rss viwer customization ....anyways let me try it once.........

Andrej Baranovskij said...

Yes, for lock icon - it looks like IDE bug, but you can customize it successfully still. Good luck :)

Andrejus

Robin said...

Hi,

I was trying to integrate Microsoft sharepoint with webcenter application,I got the adapter and insatlled the Jdev extension , but when I was trying to create a connection from within the Jdev, using the my sharepoint username and password , it errors out with the message, Unauthorized User .. any clue of whats going wrong here..

Thanks Andrejus!!!

CZubrecki said...

This seems really neat! I wish it was a little simpler though, all in all, great post!

Anonymous said...

Hi Andre,

1st this is an excellent blog.

I wanted to know how to get delayed RSS feeds from an external RSS Source eg. CNN. So that I get to see only those feeds that are 30mins older.

Thanks in advance.

Andrej Baranovskij said...

It depends if CNN supports such functionality, do they allow to pass parameter as part of RSS URL? If so, you can add this parameter.

Andrejus

Anonymous said...

I was thinking that I call the CNN URL with a paramter say 30(this is my no. of minutes delay) it shows the same page as without URL. Now in Webcenter I write a bean where I obtain this parameter '30' and make calculations to get the Current System Datetime and the Blog Publish Datetime.Then subtract them, if the result is greater than 30 mins. then set the RENDER property of the RSS FEED TRUE else FALSE. This way I will only get to see the blogs that are 30 mins older. What do you think?

Robin said...

Hi Andrejus , That was a great post.I have a requirement here like , by default when i am using the rss feeds taskflow i am seeing the older events in the beginning and the most recent event at the end. So is there way for me to bring the most recent events first.

Andrej Baranovskij said...

Hi,

It probably depends how RSS source returns data? do you have any additional parameter to change order?

Andrejus