| By Chris Muir | Article Rating: |
|
| August 6, 2010 02:45 PM EDT | Reads: |
2,677 |
Another blog post along the lines of "this caught me out, cost two hours of debugging, hopefully you'll learn from my mistakes."
JDev 11g readers will be familiar with the concept of contextual events, a powerful addition that allows task flows embedded in regions to communicate with each other, passing data payloads back and forwards.
Oh, did I say payloads? I meant pay-loads, or is that pay loads? Let's try Pay Loads. Geez what's the difference?
What am I on about?
Within the contextual event framework, effectively there is a "producer" task flow and a "consumer" task flow. The producer publishes a contextual event, and the consumer subscribes to the contextual event. It's all rather handily described in Section 28.7.1 of the Fusion Guide How to Create Contextual Events Declaratively
The publisher can pass a data payload (payLoad, PayLoad, um, pay load?) to the consumer. The publisher users an EL expression to extract data from their local bindings to do this, maybe something like #{bindings.employeeNo.inputValue}, which would be familiar to ADF programmers. The consumer however needs to use an EL expression #{payLoad} to capture the data from the published event.
Now to be specific here the EL expression is "pay" all lowercase, then "Load" with a capital "L" lowercase "oad", not "payload" all in lowercase.
What's the big deal? Well if you do anything else like #{payload} or #{PayLoad}, while the consumer will receive the published contextual event, unfortunately no data gets passed. Of course that's expected behaviour because EL is case sensitive and for whatever ADF internal code is calling behind the scenes, it can't resolve the Java routine name to lookup.
However the problem for developers is, in the English language if you search numerous dictionaries, you'll find the term is "payload", not two words "pay" and "load". It's therefore not intuitive for developers, something people I think will make a mistake on particularly when you read the examples where capital L looks very similar to a lowercase l anyway, and unfortunately, in JDev 11.1.1.2.0 (at least where I tested this) the IDE gives you no warning that you've got it wrong at design time.
So hopefully for readers, forewarned is forearmed (or is that forewarned is forearmed?), and you wont waste an afternoon trying to get something that is in essence very simple to work.
Read the original blog entry...
Published August 6, 2010 Reads 2,677
Copyright © 2010 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Chris Muir
Chris Muir, an Oracle ACE Director, senior developer and trainer, and frequent blogger at http://one-size-doesnt-fit-all.blogspot.com, has been hacking away as an Oracle consultant with Australia's SAGE Computing Services for too many years. Taking a pragmatic approach to all things Oracle, Chris has more recently earned battle scars with JDeveloper, Apex, OID and web services, and has some very old war-wounds from a dark and dim past with Forms, Reports and even Designer 100% generation. He is a frequent presenter and contributor to the local Australian Oracle User Group scene, as well as a contributor to international user group magazines such as the IOUG and UKOUG.
- It's the Java vs. C++ Shootout Revisited!
- Patterns for Building High Performance Applications
- OpenXava 4.3: Rapid Java Web Development
- Asynchronous Logging Using Spring
- Java for Programmers (2nd Edition)
- Cross-Platform Mobile Website Development – a Tool Comparison
- Write Once Run Anywhere or Cross Platform Mobile Development Tools
- Three Buzzwords That Every CIO Hears but One They Should Listen To
- Immersing into JavaScript Frameworks
- Workday Reportedly Prepping to Go Public
- Book Review: Sams Teach Yourself Java in 24 Hours
- Cloud Expo New York: The Java EE 7 Platform - Developing for the Cloud
- Book Excerpt: Introducing HTML5
- Adobe Sends Flex to the Apache Foundation
- Five Years Waiting for JRE 7: Is It Justified? (Part 1)
- Book Excerpt: Java Application Profiling Tips and Tricks
- i-Technology in 2012: Five Industry Predictions
- It's the Java vs. C++ Shootout Revisited!
- Patterns for Building High Performance Applications
- OpenXava 4.3: Rapid Java Web Development
- The Next Web Architecture
- Asynchronous Logging Using Spring
- Java for Programmers (2nd Edition)
- Is Write Once Run Anywhere Ever Going to Be a Reality?
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- JavaServer Faces (JSF) vs Struts
- The i-Technology Right Stuff
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- What's New in Eclipse?
- i-Technology Predictions for 2007: Where's It All Headed?
















