WLP Content Presenter Portlet Simplified

I find the steps at Adding the Content Presenter Portlet to be a bit hard to follow as the content loops back and forth between the sample application and your application, and has frequent references to other documentation where the link goes to the start of the document rather than the specific section necessary for the task at hand. Having always liked reading and writing Quick Start guides, I am posting this one for the WebLogic Portal Content Presenter Portlet. I will later add how to incorporate the inline editing demonstrated in the sample application once I figure it out for myself.

So, first off, I will skip ahead to explain why I start the Quick Start where I do, which is that the templates we will want to add later spit compile errors in OPOE. For that reason, I am creating a separate Portal Web Application that will later be deployed as a shared library. If you don’t need the templates from the sample  app,  you can just use your main application. If you don’t know how to get that far on your own, see the WLP Quick Start and come back here. One other caveat is that you will need a DataSync project associated with the EAR project.

Once you have whatever portal web application that will be Content Presenter enabled chosen, you need to add the necessary facets. Unlike WebLogic Workshop for WLP, you aren’t prompted to add facets when creating the project, so you need to go to the Project Properties after creating the Portal Web Application and add them.

The facet we care about is Content Presenter Framework. It does, however, have some dependencies. Fortunately, OPOE  lets you know what they are:

Adding Facets to WLP

So, rather than list them all out here, just select Content Presenter Framework under WebLogic Portal (Optional) and follow the errors for what to add. One note is that you will want Struts 1.2 instead of 1.3. Otherwise, the default version will do the trick.

To save time, I also selected the Sample Framework Components facet. You will eventually need to build your own log-in portlet, but this should do to get the Content Presenter working.

If you don’t already have one, create a .portal file for your portal web application and add the Sample Login Portlet. You could add the Content Presenter portlet at this time, but unless you are only going to have one in the application you don’t want to as it will be tied to the library instance. By adding it to new desktop  in the Portal Administration Tool (PAT), you will create a separate instance each time.

Create .portal File and Add Login

If you don’t already have some content in your repository to display, once you deploy the portal application go create some as the Content Presenter doesn’t seem to have the facility to create new content (or I haven’t figured it out yet, but if you are reading this then you haven’t either 🙂 ).

With content ready, create a portal and desktop (again, if you haven’t already) and add the content presenter portlet onto a page in the desktop (again, we do this here to have a specific instance):

Add Content Presenter Portlet to Desktop

You will also need to enable Disc on your desktop if you want the sample login portlet to work.

And…

Ta Daaaa!

At this point you can return to the standard documentation at Section 14.2.1, “Configuring the Content Presenter Portlet” for the rest of the steps as it seems to be back on track (for my taste) at that point.

Facebooktwitterredditlinkedinmail
© Scott S. Nelson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.