With the new release of JDeveloper - PS3, we can install WebCenter PS3 extensions (use Check for Updates, see here). There are tons of new features, and bugs also? Let's hope that no :) Product is definitely improving with new features and becoming really attractive. New term is introduced - WebCenter Portal Framework application. This means we are not building anymore just WebCenter applications based on ADF framework. We are implementing portals ! Sounds inspiring - too good to be true? :) Well we will see, how stable this product will be - I will cover many topics from functionality to performance, in my future posts. Seems like lots of material for blogging this year ! :) On positive note - remember early ADF 11g TP releases, it takes time to make it solid. Now we can work with really stable framework.
Today I will start with easy topic - introduce WebCenter PS3 Navigation Model. Remember those times when we were implementing database driven dynamic menus ? Good - now you can forget it, now we have declarative dynamic menu provided by WebCenter PS3. One of the key things - its not limited to work only with one type of content. It supports everything - pages, ADF task flows, UCM content, external Web pages. Please read - Building a Navigation Model for Your Portal and Visualizing Your Portal Navigation from WebCenter PS3 developer guide. Its very useful to be aware of different options for Expression Language related to navigation.
Download sample application - EnterprisePortalApp.zip. This application is created as WebCenter Portal Application:
Wizard will guide you through application setup steps - Portal creation:
Make sure you configure your application with standard Portal features in the same wizard (otherwise forget it to make it working right):
WebCenter Portal application is generated without Model project. I have created one manually and implemented ADF BC objects:
Portal project contains predefine folder structure - don't touch it, it should stay like that. In order to be able to consume all WebCenter Portal Framework features, you should create your components inside that structure as well. For example, I have created ADF task flow with fragment:
You should create ADF task flow inside predefined folder structure. Same applied for JSF fragments:
In order to define menu model, open default-navigation-model.xml file, add menu items there:
You can point to different targets, external pages, ADF task flows or other resources. Here I'm pointing to ADF task flow:
This simple application will work with anonymous access, we will not test security model now (new pages hierarchy wizard):
Anonymous role is granted to the ADF task flow as well:
From ADF Faces page we are simply referencing navigation model and rendering menu nodes:
You should keep in mind that WebCenter Portal Application entry file is index.html:
Right click on Portal project and choose Run:
WebCenter Portal Application screen will be rendered - default menu defined in default-navigation-model.xml file is rendered as well:
Click on Oracle menu item - external page is rendered inside ADF page automatically:
Same works for the second menu item:
Third link brings ADF task flow and allows to update information retrieved from database:
Today I will start with easy topic - introduce WebCenter PS3 Navigation Model. Remember those times when we were implementing database driven dynamic menus ? Good - now you can forget it, now we have declarative dynamic menu provided by WebCenter PS3. One of the key things - its not limited to work only with one type of content. It supports everything - pages, ADF task flows, UCM content, external Web pages. Please read - Building a Navigation Model for Your Portal and Visualizing Your Portal Navigation from WebCenter PS3 developer guide. Its very useful to be aware of different options for Expression Language related to navigation.
Download sample application - EnterprisePortalApp.zip. This application is created as WebCenter Portal Application:
Wizard will guide you through application setup steps - Portal creation:
Make sure you configure your application with standard Portal features in the same wizard (otherwise forget it to make it working right):
WebCenter Portal application is generated without Model project. I have created one manually and implemented ADF BC objects:
Portal project contains predefine folder structure - don't touch it, it should stay like that. In order to be able to consume all WebCenter Portal Framework features, you should create your components inside that structure as well. For example, I have created ADF task flow with fragment:
You should create ADF task flow inside predefined folder structure. Same applied for JSF fragments:
In order to define menu model, open default-navigation-model.xml file, add menu items there:
You can point to different targets, external pages, ADF task flows or other resources. Here I'm pointing to ADF task flow:
This simple application will work with anonymous access, we will not test security model now (new pages hierarchy wizard):
Anonymous role is granted to the ADF task flow as well:
From ADF Faces page we are simply referencing navigation model and rendering menu nodes:
You should keep in mind that WebCenter Portal Application entry file is index.html:
Right click on Portal project and choose Run:
WebCenter Portal Application screen will be rendered - default menu defined in default-navigation-model.xml file is rendered as well:
Click on Oracle menu item - external page is rendered inside ADF page automatically:
Same works for the second menu item:
Third link brings ADF task flow and allows to update information retrieved from database:
8 comments:
Hi
I am having an issue while workign with task flow and menu bar. I can make either one of them work at a time but not both. Can you please help me figure this out.
jDeveloper version:Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013
Created brand new webcenter portal application.
modified adfc-config.xml to have flow from wildcard -> home.jspx -> todaysContent-flow.xml(contains todaysContent.jspx)
Added todaysContent-flow.xml as a commandlink on home.jspx
turn on adf security
Scenario 1:
run the applicaion by right clicking on home.jspx and choose "run" (target url will be http://127.0.0.1:7101/WebCenterApp-Portal-context-root/faces/home).
Behavior:
Home.jspx is in PageHirarchy with anonymous access removed
task flow call inside home.jspx works
home menu tab throws exception given below
home.jspx is removed from page hirarchy, added to default-navigation-model.xml and security defined in jazn-data.xml (same access rights as it was in pageHirarchy)
Taskflow call inside home.jspx fails. nothing happenes upon clicking on the link
hoem menu tab works.
Scenario 2:
menu node and task flow links behaves differently if running the application by right clicking portal project adn select run where the run url is http://127.0.0.1:7101/WebCenterApp-Portal-context-root/faces/oracle/webcenter/portalapp/pages/home.jspx
Behavior:
Home.jspx is in PageHirarchy with anonymous access removed
task flow call inside home.jspx fails. nothing happenes upon clicking on the link
home menu tab throws exception
home.jspx is removed from page hirarchy, added to default-navigation-model.xml and security defined in jazn-data.xml (same access rights as it was in pageHirarchy)
Taskflow call fails. clicking on the link sothing happenes
hoem menu tab works.
exception:
LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.el.EvaluationException: oracle.adf.controller.AdfcIllegalArgumentException: oracle.adf.controller.ControllerException: ADFC-0618: View ID 'oracle/webcenter/portalapp/pages/home.jspx' is invalid.
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
at ........
I can email you the sample application if that helps.
Thank you in advance for any help.
Sudha
Hi,
I recommend to download this sample app, I'm fixing lots of WebCenter navigation issues there - http://andrejusb.blogspot.com/2011/04/practical-guide-for-oracle-webcenter.html
Andrejus
Hi Andrejus,
thank you for the quick response. I did follow the steps and even used the handler you specified and i still have the same response. would it be easy if i share my small sample application with you.
Hi,
Problem is when i remove home.jspx from pagehirarchy and grant access on jazn-data.xml, menu tab works but any reference to a bounded task flow on home.jspx fails. when i move back hoem.jspx to pagehirarchy, task flow call works but the menu tab throws an exception given below
<_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.el.EvaluationException: oracle.adf.controller.AdfcIllegalArgumentException: oracle.adf.controller.ControllerException: ADFC-0618: View ID 'oracle/webcenter/portalapp/pages/home.jspx' is invalid.
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)....
thanks
Sudha
Hi,
You can send me sample application, I will take a look and fix it.
Andrejus
Hi Andrejus,
I've been browsing the Webcenter Portal and I've been searching for documents about this. Hopefully you could give me some advice on how to do this.
Use Case is like this:
Can Webcenter Portal support globalization and do this at runtime?
I mean, take for example the default Home page. Can I rename this on a specific locale such that I would ship my product only with english translation and then at runtime, portal administrator can create their own translation and then save it somewhere and then my webcenter portal can pickup the said translation.
Is this possible?
I really don't want to hard code everything in one bundle or provide bundle per each language? I wanted it to be flexible and dynamic but I dont know how can this be done or what are the steps to do this.
Thanks
when i land on page and if i want to display some menu by default what should be done.
You should define externalId property for that menu and navigate to it - this is how WebCenter menu will render assigned task flow by default.
Andrejus
Post a Comment