GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
Working with Portlets in ADF and Webcenter
1. Working with Portlets
in Oracle ADF & Webcenter
Presenter: Zeeshan Baig
www.baigzeeshan.com
www.youtube.com/baigsorcl
Session # 288 1
2. A little about me….
• Currently working as Senior Architect Developer at Northwestern
Memorial Hospital in Chicago.
• 12+ years of experience in Oracle Development tools (Database,
Forms, APEX, ADF, Fusion)
• Oracle ACE, OCP DBA certified in 8, 8i and 10g
• Technical blog on ADF and other fusion technologies at
www.baigzeeshan.com
• YouTube channel http://youtube.com/baigsorcl
Disclaimer: The views expressed are my own and does not affiliates with my employer
Images used in this presentation courtesy of Google images and Oracle Documentation
Session # 288 2
3. Agenda
• ADF & Webcenter Overview
• What is Portlet?
• Portlets Producer Types and Modes
• ADF Task flows v/s Portlets
• Developing Portlets in ADF
• Testing and Deploying Portlets
• Consuming Portlets in Webcenter Portal and Spaces
• Portlet Communication
• Tips & Guidelines
• Demo
• Q&A
Session # 288 3
4. Survey
• How many people are familiar with Java?
• How many people are working with
Oracle ADF OR WebCenter?
• How many people have worked with Portlets?
Session # 288 4
5. ADF & Webcenter
What is ADF?
End to end framework builds on JEE standard
platform to develop Web 2.0 Applications
What is Webcenter?
Extensional framework builds on top of ADF to
develop Enterprise 2.0 portals with features like
Portlets, RSS, Discussion forums and Content
management
What is Jdeveloper?
A free integrated tool to build Java-SOA based
applications
Session # 288 5
6. Things to do
• Download and Install Oracle
database i.e. Oracle XE
• Download and Install Oracle
Jdeveloper version 11.1.1.5 (PS4)
• Download and Install Oracle
Webcenter Extensions for Jdeveloper
Session # 288 6
7. What is Portlet?
• As per Wikipedia
"Portlets are pluggable user interface software components
that are managed and displayed in a web portal."
• Reusable component visible on page
• Draws content from different sources
• Often compare to web-services and ADF task flows
• Can be local or remotely deployed
• Can display excerpts from other sites
• May or may not be rendered in in-line IFRAME
• Can display elements of HTML, formatted text, images
Session # 288 7
9. Portlet Producers Types
Works as a communication link between Portal and Portlets
WSRP Producer
Uses WSDL, allows any standard web-based application to work as portlet.
PDK-Java Producer
Uses Industry standards like XML, SOAP, HTTP.
Portal-Tools Producer
Allows to create/consume portlets on Portal without known complex programming
Session # 288 9
10. Portlets Modes
VIEW Defines how portlet will be visible on page. All portlets
must have View mode.
EDIT Allow authorized user to personalize portlet e.g. Title,
appearance, content
EDIT – Allow to change system-level personalization on the
DEFAULTS portlet
HELP Allow to display information about functionality of the
portlet
ABOUT Display information like version, copyright, contact
author
Session # 288 10
11. Task Flows v/s Portlets
Local Task Flow Remote Task Flow ADF Based Portlet
Use same Skin as consumer Use its own skin. opens in Renders in iFrames uses its
portal pop or different window own skin
Support Transactions No Support for Transactions No Support for Transactions
Interaction between task Input output parameters inter-portlet communication
flows via Contextual events,
Input output parameters
Deployed with consumer app Deployed separately Deployed separately
Full ADF / Webcenter security Requires Single Sign-on WS-Security with OWSM is
used for authentication
Session # 288 11
12. Portlet Types
• JSF Portlets
• Programmable Portlets
• Standard Java Portlet
• PDK-Java Portlet
• Web clipping
• Omni Portlet
Session # 288 12
13. JSF Portlets
• Oracle JSF Portlet Bridge allows to convert
existing JSF applications into Portlets
• Same code for both portlets and app
• Right click Task flow or Page and choose
“Create Portlet Entry”
• File portlet.xml file contains all metadata
Session # 288 13
14. Programmable Portlets
• Standard based JSR 286 Portlets uses
WSRP and WSDL
• PDK Java Portlets uses standard
technologies
• Ideal for Integration with other apps
• Usually Deployed as WAR
Session # 288 14
15. Web Clipping
• Clips a complete or section of web
page as a portlet
• No Coding experience required
• Leverage single sign-on solution with
sites requires authentication
• Some limitations exists
Session # 288 15
16. Omni-Portlet
• Allow to add portlet to your application at
design time, and customize at runtime.
• Supports many Data sources
including SQL, XML, web services,
spreadsheets, and web pages.
• Supports different layouts like tables
and charts
• Allows personalization
Session # 288 16
17. Testing & Deployment
• Test in Integrated Weblogic Server
• Deploy to Weblogic server
• Create WAR deployment description
• Right click portlet and create WAR file
OR
• Deploy directly to Application server
Session # 288 17
18. Consuming Portlets
In Webcenter Portal
• Get portlet WSDL or Provider URL end-
point
• Create Connection in Resource Palette or
Webcenter Portal application to register
the portlet
• Drag and Drop the Portlet from connection
to JSF Page
• Set necessary Portlet tags and parameters
Session # 288 18
19. Consuming Portlets
In Webcenter Spaces
• Get portlet WSDL or Provider URL end-
point
• Open Enterprise Manager Fusion
middleware Control
• Register Portlet with Webcenter Spaces
• Edit Webcenter spaces JSF page in
Composer mode
• Add Portlet from Resource catalog
• Enter portlet parameters and Save
Session # 288 19
20. Portlets Communication
• Wiring Portlets at Design Time
– Edit Page Binding for Portlet 2
– Set source of parameter as source of Portlet 1
– Set Partial triggers
• Wiring Portlets at Runtime
– Log in as Administrator on Portal
– Edit the page and go to Portlet properties
– Use EL Expression to set the parameter values
– Set partial triggers to portlet Id
• Contextual Wiring of Portlets using Events
– Uses payLoad instead of parameter values
– Set payLoad values at Event tab of portlet properties
Session # 288 20
21. Tips & Guidelines
• Use Standard HTML and CSS
• Keep content concise
• Test in different browsers with window resizing behavior
• Never use JavaScript to do redirect inside Portlet.
Open a new browser window instead
• Pop-ups, Input date, Input color are not supported inside ADF
based portlet
• Use database persistence store in web.xml specially in cluster
environment
• Access using HTTP server instead of direct link to WLS
Session # 288 21