SlideShare a Scribd company logo
 
Extending the JSF Controller for Reusability Juan Camilo Ruiz Principal Product Manager JDeveloper Team
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Agenda Back to basics  What is Task Flow? Essential concepts The really cool stuff
Overview of JSF Page Life Cycle A JSF page is represented by a tree of UI components, called a view. Request processing is managed by  FacesServlet  , which creates  FacesContext  object. When a client makes a request for the page, the life cycle starts. During the life cycle, JSF implementation builds the view while considering state saved from the previous postback. When the client performs a postback of the page, JSF implementation must perform life-cycle steps: Conversion Validation
<Insert Picture Here> Controllers  What and Why?
How to get to the Opera? You Are Here Opera The Rules Line 6 doesn't operate on Sundays You have 30 minutes to get there in time You have to meet a friend first to get the tickets You must get your evening dress from the laundry (closes at 5 pm) Train staff announced to go on strike at 6 p.m Train tickets can only be reimbursed if not used Day passes allow you to get on and off trains as often as you want
It’s all about maintenance…  Without a web controller page links are hardcoded For example:  Then we have a  change: <a href=“orderLines.jsp&quot;> customer.jsp orderLines.jsp customer.jsp orderLines.jsp orderSelect.jsp <a href=“orderSelect.jsp&quot;> <a href=“orderLines.jsp&quot;>
Web Controllers provide an Abstraction We deal with named targets or  events Changing flow no  longer requires page changes  Controller metadata defines how to handle the event showOrder customer.jsp orderLines.jsp customer.jsp orderLines.jsp orderSelect.jsp showOrder showOrderDetail
<Insert Picture Here> ADF  Controller
ADF Controller ADF controller (ADFc) extends and supersedes JavaServer Faces navigation model Task flows define and process user navigation Ideally suited for reuse and to partition application development Metadata driven Key concept and core knowledge in Oracle ADF you can survive up to 10 days without water but you won't last more than a day without task flows
ADF Controller Responsibility Peform application navigation across browser pages and within browser pages Navigate between activities and task flows and maintain controller state Execute controller logic and custom methods during navigation Manage task flow instance
ADF Controller Benefits Additional memory scopes Avoid memory attribute name conflicts Avoid memory bloating Improved and declarative exception handling Supports traditional web navigation model and rich internet navigation models Support for nested control flows Configurable order of Phase Listener execution Save points for undo and failure recovery
JSF and ADF Lifecycles
What we say, what we mean Unbounded Taskflow Serve as the entry point to an application First entry on task flow stack — the outer-most task flow No well-defined boundary or single point of entry Used to define the “top level” flow of an application Used to build menu models Declarative bookmarking of view activities Bounded Taskflow Reusable &quot;white box&quot; navigation and processing Single point of entry  Well-defined boundary Own memory scope Declarative transaction management Declarative Back button support Input/output parameters
Key Concepts View Activity Transitions (navigation rules) Method Execution Router Exception handling
Key Navigation Components Method Call  Invokes application logic within application control flows, not within the page markup itself as in standard JSF applications.  The method call activity typically invokes a method on a managed bean Router Evaluates an EL expression and returns an outcome based on the value of the expression Save Point and Restore Restores a previous persistent Save Point in an application supporting save for later functionality Task Flow Call Calls an ADF bounded task flow from a particular point in an application Task Flow Return Identifies when a bounded task flow completes and sends control flow back to the caller
Key Navigation Components URL View Redirects the root view port (for example, a browser page) to any URL addressable resource, even from within the context of an ADF region View Displays a JSF page or page fragment. Multiple View activities can represent the same page or same page fragment Control Flow Case Identifies how control passes from one activity to the next in the application Wild Card Control Flow Rule Represents a control flow rule that can originate from any activities whose ids match a wildcard expression.  Uses trailing wildcard such as foo* Parent Action Option to call a parent navigation flow from a region
View Activity Display a named page Allows the same page to be used in more than one context Unlike JSF Page usages can be parameterized  to help with reuse For example: Sending different parameters  to queries used by the page Different boilerplate text  e.g. page title  Transitions or events link  from pages to other activities  Redirect or forward <view id=&quot;reducedAccess&quot;> <page>/secured/information.jspx</page> <input-page-parameter> <from-value> #{res['infoUsage.messageHeader']}   </from-value> <to-value>   #{pageFlowScope.infoPageHeaderText} </to-value> </input-page-parameter> <input-page-parameter> <from-value>info</from-value> <to-value> #{pageFlowScope.infoPageType} </to-value> </input-page-parameter> </view>
Transition aka Control Flow Case The named “events” that link activities Just like JSF navigation rules Raised by command items in the page buttons / links / menus  Defined as the action attribute, or the result of action code Transitions have a source Combination of page and raising method Wildcards are allowed so “global” rules are possible  Transitions have a destination An activity What does it really mean? You just draw a line on the diagram!
Transitions <control-flow-rule>   <from-activity-id>   editRecord   </from-activity-id>   <control-flow-case>   <from-outcome>pagehelp</from-outcome>   <to-activity-id>appHelp</to-activity-id>   </control-flow-case> </control-flow-rule> editRecord appHelp pageHelp globalHelp <control-flow-rule>   <from-activity-id>*</from-activity-id>   <control-flow-case>   <from-outcome>globalhelp</from-outcome>   <to-activity-id>appHelp</to-activity-id>   </control-flow-case> </control-flow-rule>
Methods Execute code as part of a flow For example before a page to set up data Not available in JSF (although Struts has it) Methods defined in Java and referenced through EL Parameters – literals or from EL Output from the method can be used to trigger navigation If returns a String value (or something that can be converted to a string) A fixed outcome is also possible The method return value  can be stored through EL Method activities can be  bound to backend business services
Using URL View Activities You can use a URL view activity to redirect the root view port (for example, a browser page) to any URL addressable resource, even from within the context of an ADF region.  URL addressable resources include: ADF bounded task flow view activities in an ADF unbounded task flow addresses external to the current web application (for example, Google)
Demonstration Unbounded Taskflow
Bookmarking View Activities Available only in unbounded task flows Can designate in Property Inspector at  design time Can designate at run time with the ViewBookmarkable() method Can optionally specify: URL parameters Method to invoke before view is rendered You can use the redirect option for a view activity  instead of making it bookmarkable
<Insert Picture Here> Cool Stuff  Sub-Flows
Task Flow Templates Capture common behavior for reuse across different ADF bounded task flows For example, common exception handling Can be created from an existing task flow Template changes can be automatically propagated to any instance that uses it Reuse by copy Reuse by reference
Now it Gets Interesting… There are actually two types of task flow  Unbounded  Bounded Unbounded task flows are just like JSF or Struts navigation rules Any activity is accessible from the URL  No real beginning or end Plus some  cool stuff Automatic menu generation based on the pages in the flow
Bounded Task Flows Can be nested within and called from other task flows  Invoked Task flow call activity  Treated like any other activity  Parent is suspended whilst the sub-flow has “focus” Has a defined API Parameters and outcomes (just like view activities) Has a strict entry point – users can't just jump to a page  Special handling for the browser back button Initializer and Finalizer code can be defined Automatically run Can be created based on templates
Bounded Task Flow Example editRecord addCust createCustomer Bounded Task Flow
Passing Parameters to an ADF Bounded Task Flow To pass an input parameter to a bounded task flow, you must specify: Input parameter on the task flow call activity. These specify where the calling task flow will store parameter values Input parameter definition on the called bounded task flow. These specify where the called bounded task flow can retrieve parameter values. The input parameter name specified for each of the above options will be the same in order to map input parameter values back into the called bounded task flow.  The value for each corresponds to the mapping between where the value will be retrieved within the caller and the called task flow.
Back Button Support: Reentering an ADF Bounded Task Flow You can specify what to do when the user clicks the back button to navigate back into a bound task reentry-allowed end user can re-enter the task flow reentry-not-allowed use can navigate back into the task flow, but doing anything on the page throws an exception reentry-outcome-dependent Reentry of the calling bounded task flow is dependent on the outcome received when exiting the called bounded task flow.
Demonstration Bounded Taskflow
<Insert Picture Here> &quot;To go or not to Go&quot;  Router Decisions
Routers Controlling flow in a declarative manner Basically a SWITCH construct for flow Series of outcomes linked to EL  If the expression evaluates to  true then the outcome is set <router id=&quot;userTypeCheck&quot;>  <case>   <expression>   #{userType == ‘MANAGER_ROLE'}   </expression>   <outcome>manager</outcome>  </case>  <case>…</case>  <default-outcome>   forbidden </default-outcome> </router>
Demonstration Routers
<Insert Picture Here> Exceptions, Transactions  and Scopes
Exception Handling Exceptions can be mapped to an activity Generally for unexpected exceptions or security violations Not a “normal” part of a flow Only one handler per flow However, that could be a method or a router if different errors need different handling <exception-handler>unexpectedErrorPage</exception-handler>
Transactional Semantics Bounded task flows can also define transaction boundaries When a flow is started, you can define: A new transactional state should be created  The existing state should be reused Declaratively do an  automatic commit or rollback when the flow ends Depending on end state if required
It’s a Matter of Scope This is the most important thing… Task flows have a private memory scope - PageFlowScope Plus the usual request, session and application scopes Accessed via expression language like the other scopes - #{pageflowScope.bean}  Private to each flow (and  instance  of a flow) This allows nesting and reuse Data mapped in and out in call activities and task flow returns
Available Object Scopes
Trains Bounded task flows can define a train The framework Maintains knowledge of there you are Train control and  Navigation buttons  automatically managed
<Insert Picture Here> Regions  The Magic of Ajax
It’s Not Just Pages Bounded task flows can be made up of page fragments (.jsff files) Such flows can then be embedded into pages as “regions”  This is a very common pattern allowing the creation of complex pages made up of a series of re-usable components (ie. Task Flows) Just drag and drop the flow into the page
Demonstration Regions
What You Should Know The ADF controller only operates in a JSF 2.0 environment Oracle's web-based ADF application strategy focuses on JSF as the sole view layer technology ADF controller extensions are implemented on top of Oracle's ADF Faces.  ADF controller extensions do not run against the reference or MyFaces implementations of JSF unless ADF Faces is present There is no support for a migration from Struts or Model 1 to the Fusion ADF Controller The developer will use ADF Bounded Task Flows to manage transaction boundaries. Page Flow scope is not available before the restore view phase
Summary ADF Task Flow is one of the major new features of JDeveloper & ADF R11 otn.oracle.com/jdev Meets the needs of changing UIs Modern AJAX applications have fewer richer pages Fragment based task flows address this
Join the JDeveloper/ADF Community Twitter twitter.com/Jdeveloper Facebook facebook.com/Jdeveloper Oracle’s JDeveloper PM blog blogs.oracle.com / JDeveloperpm oracle.com/technetwork/jdev
Q  U  E  S  T  I  O  N  S A N S W E R S &
 
Ad

More Related Content

What's hot (20)

Reuse in adf applications
Reuse in adf applicationsReuse in adf applications
Reuse in adf applications
Matthieu De Graaf
 
Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for Beginners
Jithin Kuriakose
 
ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)
Wilfred van der Deijl
 
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Klaus Hofeditz
 
Jsf
JsfJsf
Jsf
Shaharyar khan
 
Greate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFGreate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADF
Mohamed Shahpoup
 
Integration of APEX and Oracle Forms
Integration of APEX and Oracle FormsIntegration of APEX and Oracle Forms
Integration of APEX and Oracle Forms
Roel Hartman
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
Klaus Hofeditz
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
SoftServe
 
Oracle ADF 11g Tutorial
Oracle ADF 11g TutorialOracle ADF 11g Tutorial
Oracle ADF 11g Tutorial
Rakesh Gujjarlapudi
 
CAF & Portlet Development Notes
CAF & Portlet Development NotesCAF & Portlet Development Notes
CAF & Portlet Development Notes
Vladimir Ivanchenko
 
L17 Presentation Layer Design
L17 Presentation Layer DesignL17 Presentation Layer Design
L17 Presentation Layer Design
Ólafur Andri Ragnarsson
 
Oracle fusion dba online training
Oracle fusion  dba online trainingOracle fusion  dba online training
Oracle fusion dba online training
Glory IT Technologies Pvt. Ltd.
 
Oracle application framework (oaf) online training
Oracle application framework (oaf) online trainingOracle application framework (oaf) online training
Oracle application framework (oaf) online training
Glory IT Technologies Pvt. Ltd.
 
oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...
Nancy Thomas
 
Customizing Oracle EBS OA Framework
Customizing Oracle EBS OA FrameworkCustomizing Oracle EBS OA Framework
Customizing Oracle EBS OA Framework
iWare Logic Technologies Pvt. Ltd.
 
2.j2 ee overview
2.j2 ee overview2.j2 ee overview
2.j2 ee overview
SDFG5
 
Spring Mvc Rest
Spring Mvc RestSpring Mvc Rest
Spring Mvc Rest
Craig Walls
 
Pega prpc tutorials for beginners
Pega prpc tutorials for beginnersPega prpc tutorials for beginners
Pega prpc tutorials for beginners
Ashock Roy
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Amit Singh
 
Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for Beginners
Jithin Kuriakose
 
ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)
Wilfred van der Deijl
 
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Klaus Hofeditz
 
Greate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFGreate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADF
Mohamed Shahpoup
 
Integration of APEX and Oracle Forms
Integration of APEX and Oracle FormsIntegration of APEX and Oracle Forms
Integration of APEX and Oracle Forms
Roel Hartman
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
Klaus Hofeditz
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
SoftServe
 
oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...oracle oa framework training | oracle oa framework training courses | oa fram...
oracle oa framework training | oracle oa framework training courses | oa fram...
Nancy Thomas
 
2.j2 ee overview
2.j2 ee overview2.j2 ee overview
2.j2 ee overview
SDFG5
 
Pega prpc tutorials for beginners
Pega prpc tutorials for beginnersPega prpc tutorials for beginners
Pega prpc tutorials for beginners
Ashock Roy
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Amit Singh
 

Viewers also liked (6)

Research week3 idea
Research week3 ideaResearch week3 idea
Research week3 idea
rayborg
 
Cybersecurity cyberlab1
Cybersecurity cyberlab1Cybersecurity cyberlab1
Cybersecurity cyberlab1
rayborg
 
Mushroom tutorial http://rjdatamining.weebly.com
Mushroom tutorial http://rjdatamining.weebly.comMushroom tutorial http://rjdatamining.weebly.com
Mushroom tutorial http://rjdatamining.weebly.com
rayborg
 
8071 25045-1-pb
8071 25045-1-pb8071 25045-1-pb
8071 25045-1-pb
Rohan Manawat
 
Final delegation
Final delegationFinal delegation
Final delegation
Deepa Dinesh
 
Delegation Skills
Delegation SkillsDelegation Skills
Delegation Skills
Sanchita Singh
 
Research week3 idea
Research week3 ideaResearch week3 idea
Research week3 idea
rayborg
 
Cybersecurity cyberlab1
Cybersecurity cyberlab1Cybersecurity cyberlab1
Cybersecurity cyberlab1
rayborg
 
Mushroom tutorial http://rjdatamining.weebly.com
Mushroom tutorial http://rjdatamining.weebly.comMushroom tutorial http://rjdatamining.weebly.com
Mushroom tutorial http://rjdatamining.weebly.com
rayborg
 
Ad

Similar to Silicon Valley Code Camp - JSF Controller for Reusability (20)

CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
Barry Gervin
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
Ashish Gupta
 
Struts Intro
Struts IntroStruts Intro
Struts Intro
guestd8c458
 
08052917365603
0805291736560308052917365603
08052917365603
DSKUMAR G
 
Build your Business Services using ADF Task Flows
Build your Business Services using ADF Task FlowsBuild your Business Services using ADF Task Flows
Build your Business Services using ADF Task Flows
DataNext Solutions
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
Tomi Juhola
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
Volkan Uzun
 
MVC
MVCMVC
MVC
akshin
 
JSF Presentation"2"
JSF Presentation"2"JSF Presentation"2"
JSF Presentation"2"
SiliconExpert Technologies
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentation
buildmaster
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
Lucas Jellema
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
Peter Gfader
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
Vinay Kumar
 
Oracle ADF Task Flows for Beginners
Oracle ADF Task Flows for BeginnersOracle ADF Task Flows for Beginners
Oracle ADF Task Flows for Beginners
DataNext Solutions
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
Jignesh Aakoliya
 
Jsf 2.0 in depth
Jsf 2.0 in depthJsf 2.0 in depth
Jsf 2.0 in depth
SILBURY IT SOLUTIONS GMBH
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
 
ADF Taskflows for beginners
ADF Taskflows for beginnersADF Taskflows for beginners
ADF Taskflows for beginners
Rajasekhar Manda
 
Model View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptxModel View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptx
MarioCaday2
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
Barry Gervin
 
08052917365603
0805291736560308052917365603
08052917365603
DSKUMAR G
 
Build your Business Services using ADF Task Flows
Build your Business Services using ADF Task FlowsBuild your Business Services using ADF Task Flows
Build your Business Services using ADF Task Flows
DataNext Solutions
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
Tomi Juhola
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
Volkan Uzun
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentation
buildmaster
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
That's Rich! Putting a smile on ADF Faces (ODTUG Kaleidoscope 2009)
Lucas Jellema
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
Peter Gfader
 
Oracle ADF Task Flows for Beginners
Oracle ADF Task Flows for BeginnersOracle ADF Task Flows for Beginners
Oracle ADF Task Flows for Beginners
DataNext Solutions
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
Jignesh Aakoliya
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
 
ADF Taskflows for beginners
ADF Taskflows for beginnersADF Taskflows for beginners
ADF Taskflows for beginners
Rajasekhar Manda
 
Model View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptxModel View Controller-Introduction-Overview.pptx
Model View Controller-Introduction-Overview.pptx
MarioCaday2
 
Ad

Recently uploaded (20)

HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 

Silicon Valley Code Camp - JSF Controller for Reusability

  • 1.  
  • 2. Extending the JSF Controller for Reusability Juan Camilo Ruiz Principal Product Manager JDeveloper Team
  • 3. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 4. Agenda Back to basics What is Task Flow? Essential concepts The really cool stuff
  • 5. Overview of JSF Page Life Cycle A JSF page is represented by a tree of UI components, called a view. Request processing is managed by FacesServlet , which creates FacesContext object. When a client makes a request for the page, the life cycle starts. During the life cycle, JSF implementation builds the view while considering state saved from the previous postback. When the client performs a postback of the page, JSF implementation must perform life-cycle steps: Conversion Validation
  • 6. <Insert Picture Here> Controllers What and Why?
  • 7. How to get to the Opera? You Are Here Opera The Rules Line 6 doesn't operate on Sundays You have 30 minutes to get there in time You have to meet a friend first to get the tickets You must get your evening dress from the laundry (closes at 5 pm) Train staff announced to go on strike at 6 p.m Train tickets can only be reimbursed if not used Day passes allow you to get on and off trains as often as you want
  • 8. It’s all about maintenance… Without a web controller page links are hardcoded For example: Then we have a change: <a href=“orderLines.jsp&quot;> customer.jsp orderLines.jsp customer.jsp orderLines.jsp orderSelect.jsp <a href=“orderSelect.jsp&quot;> <a href=“orderLines.jsp&quot;>
  • 9. Web Controllers provide an Abstraction We deal with named targets or events Changing flow no longer requires page changes Controller metadata defines how to handle the event showOrder customer.jsp orderLines.jsp customer.jsp orderLines.jsp orderSelect.jsp showOrder showOrderDetail
  • 10. <Insert Picture Here> ADF Controller
  • 11. ADF Controller ADF controller (ADFc) extends and supersedes JavaServer Faces navigation model Task flows define and process user navigation Ideally suited for reuse and to partition application development Metadata driven Key concept and core knowledge in Oracle ADF you can survive up to 10 days without water but you won't last more than a day without task flows
  • 12. ADF Controller Responsibility Peform application navigation across browser pages and within browser pages Navigate between activities and task flows and maintain controller state Execute controller logic and custom methods during navigation Manage task flow instance
  • 13. ADF Controller Benefits Additional memory scopes Avoid memory attribute name conflicts Avoid memory bloating Improved and declarative exception handling Supports traditional web navigation model and rich internet navigation models Support for nested control flows Configurable order of Phase Listener execution Save points for undo and failure recovery
  • 14. JSF and ADF Lifecycles
  • 15. What we say, what we mean Unbounded Taskflow Serve as the entry point to an application First entry on task flow stack — the outer-most task flow No well-defined boundary or single point of entry Used to define the “top level” flow of an application Used to build menu models Declarative bookmarking of view activities Bounded Taskflow Reusable &quot;white box&quot; navigation and processing Single point of entry Well-defined boundary Own memory scope Declarative transaction management Declarative Back button support Input/output parameters
  • 16. Key Concepts View Activity Transitions (navigation rules) Method Execution Router Exception handling
  • 17. Key Navigation Components Method Call Invokes application logic within application control flows, not within the page markup itself as in standard JSF applications. The method call activity typically invokes a method on a managed bean Router Evaluates an EL expression and returns an outcome based on the value of the expression Save Point and Restore Restores a previous persistent Save Point in an application supporting save for later functionality Task Flow Call Calls an ADF bounded task flow from a particular point in an application Task Flow Return Identifies when a bounded task flow completes and sends control flow back to the caller
  • 18. Key Navigation Components URL View Redirects the root view port (for example, a browser page) to any URL addressable resource, even from within the context of an ADF region View Displays a JSF page or page fragment. Multiple View activities can represent the same page or same page fragment Control Flow Case Identifies how control passes from one activity to the next in the application Wild Card Control Flow Rule Represents a control flow rule that can originate from any activities whose ids match a wildcard expression. Uses trailing wildcard such as foo* Parent Action Option to call a parent navigation flow from a region
  • 19. View Activity Display a named page Allows the same page to be used in more than one context Unlike JSF Page usages can be parameterized to help with reuse For example: Sending different parameters to queries used by the page Different boilerplate text e.g. page title Transitions or events link from pages to other activities Redirect or forward <view id=&quot;reducedAccess&quot;> <page>/secured/information.jspx</page> <input-page-parameter> <from-value> #{res['infoUsage.messageHeader']} </from-value> <to-value> #{pageFlowScope.infoPageHeaderText} </to-value> </input-page-parameter> <input-page-parameter> <from-value>info</from-value> <to-value> #{pageFlowScope.infoPageType} </to-value> </input-page-parameter> </view>
  • 20. Transition aka Control Flow Case The named “events” that link activities Just like JSF navigation rules Raised by command items in the page buttons / links / menus Defined as the action attribute, or the result of action code Transitions have a source Combination of page and raising method Wildcards are allowed so “global” rules are possible Transitions have a destination An activity What does it really mean? You just draw a line on the diagram!
  • 21. Transitions <control-flow-rule> <from-activity-id> editRecord </from-activity-id> <control-flow-case> <from-outcome>pagehelp</from-outcome> <to-activity-id>appHelp</to-activity-id> </control-flow-case> </control-flow-rule> editRecord appHelp pageHelp globalHelp <control-flow-rule> <from-activity-id>*</from-activity-id> <control-flow-case> <from-outcome>globalhelp</from-outcome> <to-activity-id>appHelp</to-activity-id> </control-flow-case> </control-flow-rule>
  • 22. Methods Execute code as part of a flow For example before a page to set up data Not available in JSF (although Struts has it) Methods defined in Java and referenced through EL Parameters – literals or from EL Output from the method can be used to trigger navigation If returns a String value (or something that can be converted to a string) A fixed outcome is also possible The method return value can be stored through EL Method activities can be bound to backend business services
  • 23. Using URL View Activities You can use a URL view activity to redirect the root view port (for example, a browser page) to any URL addressable resource, even from within the context of an ADF region. URL addressable resources include: ADF bounded task flow view activities in an ADF unbounded task flow addresses external to the current web application (for example, Google)
  • 25. Bookmarking View Activities Available only in unbounded task flows Can designate in Property Inspector at design time Can designate at run time with the ViewBookmarkable() method Can optionally specify: URL parameters Method to invoke before view is rendered You can use the redirect option for a view activity instead of making it bookmarkable
  • 26. <Insert Picture Here> Cool Stuff Sub-Flows
  • 27. Task Flow Templates Capture common behavior for reuse across different ADF bounded task flows For example, common exception handling Can be created from an existing task flow Template changes can be automatically propagated to any instance that uses it Reuse by copy Reuse by reference
  • 28. Now it Gets Interesting… There are actually two types of task flow Unbounded Bounded Unbounded task flows are just like JSF or Struts navigation rules Any activity is accessible from the URL No real beginning or end Plus some cool stuff Automatic menu generation based on the pages in the flow
  • 29. Bounded Task Flows Can be nested within and called from other task flows Invoked Task flow call activity Treated like any other activity Parent is suspended whilst the sub-flow has “focus” Has a defined API Parameters and outcomes (just like view activities) Has a strict entry point – users can't just jump to a page Special handling for the browser back button Initializer and Finalizer code can be defined Automatically run Can be created based on templates
  • 30. Bounded Task Flow Example editRecord addCust createCustomer Bounded Task Flow
  • 31. Passing Parameters to an ADF Bounded Task Flow To pass an input parameter to a bounded task flow, you must specify: Input parameter on the task flow call activity. These specify where the calling task flow will store parameter values Input parameter definition on the called bounded task flow. These specify where the called bounded task flow can retrieve parameter values. The input parameter name specified for each of the above options will be the same in order to map input parameter values back into the called bounded task flow. The value for each corresponds to the mapping between where the value will be retrieved within the caller and the called task flow.
  • 32. Back Button Support: Reentering an ADF Bounded Task Flow You can specify what to do when the user clicks the back button to navigate back into a bound task reentry-allowed end user can re-enter the task flow reentry-not-allowed use can navigate back into the task flow, but doing anything on the page throws an exception reentry-outcome-dependent Reentry of the calling bounded task flow is dependent on the outcome received when exiting the called bounded task flow.
  • 34. <Insert Picture Here> &quot;To go or not to Go&quot; Router Decisions
  • 35. Routers Controlling flow in a declarative manner Basically a SWITCH construct for flow Series of outcomes linked to EL If the expression evaluates to true then the outcome is set <router id=&quot;userTypeCheck&quot;> <case> <expression> #{userType == ‘MANAGER_ROLE'} </expression> <outcome>manager</outcome> </case> <case>…</case> <default-outcome> forbidden </default-outcome> </router>
  • 37. <Insert Picture Here> Exceptions, Transactions and Scopes
  • 38. Exception Handling Exceptions can be mapped to an activity Generally for unexpected exceptions or security violations Not a “normal” part of a flow Only one handler per flow However, that could be a method or a router if different errors need different handling <exception-handler>unexpectedErrorPage</exception-handler>
  • 39. Transactional Semantics Bounded task flows can also define transaction boundaries When a flow is started, you can define: A new transactional state should be created The existing state should be reused Declaratively do an automatic commit or rollback when the flow ends Depending on end state if required
  • 40. It’s a Matter of Scope This is the most important thing… Task flows have a private memory scope - PageFlowScope Plus the usual request, session and application scopes Accessed via expression language like the other scopes - #{pageflowScope.bean} Private to each flow (and instance of a flow) This allows nesting and reuse Data mapped in and out in call activities and task flow returns
  • 42. Trains Bounded task flows can define a train The framework Maintains knowledge of there you are Train control and Navigation buttons automatically managed
  • 43. <Insert Picture Here> Regions The Magic of Ajax
  • 44. It’s Not Just Pages Bounded task flows can be made up of page fragments (.jsff files) Such flows can then be embedded into pages as “regions” This is a very common pattern allowing the creation of complex pages made up of a series of re-usable components (ie. Task Flows) Just drag and drop the flow into the page
  • 46. What You Should Know The ADF controller only operates in a JSF 2.0 environment Oracle's web-based ADF application strategy focuses on JSF as the sole view layer technology ADF controller extensions are implemented on top of Oracle's ADF Faces. ADF controller extensions do not run against the reference or MyFaces implementations of JSF unless ADF Faces is present There is no support for a migration from Struts or Model 1 to the Fusion ADF Controller The developer will use ADF Bounded Task Flows to manage transaction boundaries. Page Flow scope is not available before the restore view phase
  • 47. Summary ADF Task Flow is one of the major new features of JDeveloper & ADF R11 otn.oracle.com/jdev Meets the needs of changing UIs Modern AJAX applications have fewer richer pages Fragment based task flows address this
  • 48. Join the JDeveloper/ADF Community Twitter twitter.com/Jdeveloper Facebook facebook.com/Jdeveloper Oracle’s JDeveloper PM blog blogs.oracle.com / JDeveloperpm oracle.com/technetwork/jdev
  • 49. Q U E S T I O N S A N S W E R S &
  • 50.  

Editor's Notes

  • #6: Develop Applications with Oracle ADF 16 - JSF Life Cycle The life cycle of a JavaServer Faces page is similar to that of a JSP: The client makes an HTTP request for the page, and the server responds with the page translated to HTML. However, because of the extra features that JavaServer Faces technology offers, the life cycle provides some additional services to process a page. A JavaServer Faces page is represented by a tree of UI components, called a view. This tree is a run-time representation of a JSF page. Each UI component tag in a page corresponds to a UI component instance in the tree. The FacesServlet object manages the request processing lifecycle in JSF applications. FacesServlet creates an object called FacesContext , which contains the information necessary for request processing, and invokes an object that executes the lifecycle. When a client makes a request for the page, the life cycle starts. During the life cycle, the JSF implementation must build the view while considering state saved from the previous postback. When the client performs a postback of the page, the JavaServer Faces implementation performs several tasks, such as validating the data input of components in the view and convertin input data to types specified on the server side. The JSF implementation performs all of these tasks as a series of steps in the life cycle.
  • #15: Develop Applications with Oracle ADF 16 - Coordination of JSF and ADF Lifecycles When a page is submitted and a new page requested, the application invokes both the JSF request lifecycle and the ADF page lifecycle. The JSF lifecycle handles the submission of values on the page, validation for components, navigation, and displaying the components on the resulting page and saving and restoring state. The JSF lifecycle phases use a UI component tree to manage the display of the faces components. This tree is a runtime representation of a JSF page: each UI component tag in a page corresponds to a UI component instance in the tree. The FacesServlet object manages the request processing lifecycle in JSF applications. FacesServlet creates an object called FacesContext , which contains the information necessary for request processing, and invokes an object that executes the lifecycle. The ADF lifecycle handles preparing and updating the data model, validating the data at the model layer, and executing methods on the business layer. The ADF lifecycle uses the binding container to make data available for easy referencing by the page during the current page request. The ADF lifecycle also contains phases that are defined simply to notify ADF lifecycle listeners before and after the corresponding JSF phase is executed (that is, there is no implementation for these phases). This allows you to create custom listeners and register them with any phase of both the JSF and ADF lifecycles, so that you can customize the ADF page lifecycle if needed, both globally or at the page level.
  • #24: Using URL View Activites To display the resource, you must specify an EL expression that is evaluated at run-time to generate the URL to the resource. In addition, you can specify EL expressions that, when evaluated, are added as parameters and parameter values to the URL. A URL view activity redirects the client regardless of the view port (root view port or an ADF region) from which it is executed. The &lt;redirect&gt; element of a view activity performs in a similar way, except it can be used only if the view activity is within the root view port.
  • #26: Bookmarking View Activities You can enable users to easily return to a view activity in an unbounded task flow by designating the activity as bookmarkable. On the Bookmark tab of the Property Inspector you can set the bookmark property to true . You can optionally add parameters in the URL Parameters section and can add an optional method binding in the converter field for a parameter’s value. You can also optionally specify a method in the method field that the ADF Controller should invoke before rendering the view. You could use this method to retrieve additional information based on the parameter values. Instead of making the view activity bookmarkable, you may choose to use the redirect option to create a new browser URL for the view activity. You do this by setting the redirect property to true on the Common tab of the Property Inspector for the view activity.
  • #32: Passing Parameters to an ADF Bounded Task Flow A called ADF bounded task flow can accept input parameters from another ADF unbounded or bounded task flow and can pass return values to the caller upon exit. You can specify on the input parameter definition for the called bounded task flow whether an input parameter is required. If a required input parameter is not received, a runtime error occurs. An input parameter definition that is identified as not required can be ignored during task flow call activity creation.
  • #33: Reentering an ADF Bounded Task Flow To deal with cases in which the end user clicks the back button to navigate back into an ADF bounded task flow that was already exited, you can specify task-flow-reentry options for the task flow definition. These options specify whether a page in the calling ADF bounded task flow can be reentered. Upon reentry, ADF bounded task flow input parameters are evaluated using the current state of the application, not the application state existing at the time of the original ADF bounded task flow entry.