As promised here is the continuation of the technical workshop we have followed.
In this text I will talk about how we created a little appliciation in Webcenter with some build in features of webcenter. In most part of the exercise we used ADF to build this, but we have also build in some out-of-the-box portlets of webcenter such as the Omniportlet and the Rich Text Editor Portlet but this will be discussed later.
I will go into detail on the real webcenter development and I will not go into detail about the not really webcenter related issues(this is not a step by step guide)
If you want to know more about this, you will have to read further
First thing we had to do of course is to open Jdevelopper, since this is the (free) tool which is used to create the webcenter portlets – portals. The version we need for using Webcenter is jdev 10.1.3.2.0 (or later).
Then we had to create a new application. If you want to create a porlet application you have to select Webcenter Application(Portlet, content Repository,JSF) as application template.
This will not only create a new application for you, but it will already contain some structure to build your pages – portlets in. The structure contains 3 ‘directories’: Model, ViewController and Portlets. As we have already mentioned webcenter uses the MVC ADF framework. The next thing was creating a portlet. We had to right click the portlets ‘directorie’ in the application navigator and then choose the option below Web Tier -> Portlets which was ‘Standards based Java Portlets(JSR-168) the other option is the Oracle PDK-Java Portlet (this is based on the Oracle portal API’s).
Next thing we had to do in the creation wizard was to select the web application version. We had the choice between j2ee 1.3 and J2ee 1.4
We also had to give in some names, titles, keywords,… and we had to make a choice which portlet modes we wanted to use(possibilities are: help, about, config, preview, print, view, edit and edit_defaults), for this exercise we only choose view, edit and edit_defaults. For each of these 3 modes a different jsp will be build.
In this wizard you will also have to create the parameters if you want to use some in your portlet.
Once finished, our first portlet was created. But before deploying this we had to create a link to an application server and a deployment file.
In this version of jdev there is a preconfigured OC4J for webcenter. So we used this container to deploy our application on, we didn’t had to install the webcenter suite for testing our portlets. You first have to start this container, this can be done by clicking the green light on the top right of the menu in Jdev.
Hint, when creating a connection you should use 22667 as RMI port, this is the default RMI port for the webcenter container.
Once your portlet is deployed into your OC4J you can find the WSDL URL by using http://localhost:6688//portlets/wsrp2?WSDL.
We have now created a portlet but we don’t have a page to publish it on. Therefor we had to rightclick the Viewcontroller ‘directorie’ in the Application navigator and choose New. Once again you will have to choose a technology, in this case we had to choose JSF JSP(Web Tier -> JSP) .
A wizard opens and we choose jspx (xml version of a jsp page). In the wizard we selected the needed libraries(adf faces components,adf faces html,customizable components, jsf core, jsf html) since we were going to use some parts of all these libraries we selected them all.
So now we have a portlet and a page, but how do we have to include this portlet into the page? Well we have to register the portlet into the oracle Webcenter framework. Go to the Application Navigator and right click the Viewcontroller and click new. Select WSRP Producer Registration(Web-Tier -> portlets). In the next wizard you will have to give in the WSDL URL(see above). Once you have selected all the other attributes you click finish and your portlets is registered.
Now you just have to drag and drop the portlet into the jspx file. Therefor you have to open your jspx file and then select your producer in the Component Palet and drag and drop your portlet into the application.
Conclusion: I believe that there is a good future for this product it has lots of options and lots of potential, but you have to get used to all the possibilities of it and where you have to select what… But I believe that you really can create some nice working portal pages after a few days. If you want to learn more about ADF or webcenter there is only one option, start using it! I really got interested in it maybe you do too…