This site promotes and supports the development and deployment of JSF, Oracle ADF applications, and other web development topics. If you have interesting facts to share about any of these or any related technologies, please feel free to post a comment.
Wednesday, July 8, 2009
af:iterator
There was another project also where af:forEach really was acting up, where I wish I had known about af:iterator.
The inspiration to try this component came from Duncan Mills blog entry http://groundside.com/blog/DuncanMills.php?blog=6&c=1&page=1&more=1&title=jsf_and_the_foreach_loop&tb=1&pb=1&disp=single
Wednesday, March 18, 2009
Developer Day Notes
Here are my notes from the session. Hope they are helpful.
OTN Developer Day Notes
· OPI? OPEE?? (Eclipse Oracle Developer pack)
· Panel Collection – can surround a table to et a header and footer
· Rebuild will allow you to sometimes avoid rerunning a page in IDE
· Export to Excel – component to do that (uses a listener of some sort)
· FMW 11g released – calendar year 2009
· Moving splitters – maintained per user by session. To persist user settings you can use Oracle MDS – for example for a set of users you could create a preference set and store it on a database.
· When I deployed to 11g, I did not see OC4J as an option. But Lynn Munsinger says it is among the app servers they offer.
· The focus of the binding layer (JSR 227) is to abstract business services so that you don’t have to know implementation specific details SOAP,WSRP. Also it reduced the number of backing beans you need to write, and also shortens the
· I need to build a wiki of some sort (there is support for this in WebCenter suite).
· Components are ADA (Americans with disapbilities act) compliant
· Learn more about MDS (Metadata Services).
· Although ADF/BC control hints is UI mixed in Model (violation of mvc), it allows us to set standards.
· Can package up ADF BC’s as a library and deploy it, so developers can use this.
· Static list – keep small.
· You need to get a handle on deploying Application Modules for use by company.
· Google “ADF Methodology” – google group has a grassroots naming standards.
· Can create resource bundle on the fly when you create control hints.
· How do you create a plsql web service? Then you can use them in ADF/BC.
· JSF Component good because for example, table takes a collection and is trusted with doing the right thing with the data to make the table viable in HTML.
· What is stateless again? Lynne kept talking about stateless components.
· Check out print component, poll, listeners (that’s that client/javascript thing, I think)…
· Graphs are svg or flash.
· ADF Data Visualization are the graphs I think.
· Experiment with reusing a task flow.
· Task flows can go into a region really easily.
· Bounded task flows can battle the back button (huge reason for using task flows).
· Task flows are integrated with database transactions and process trains
· Can bundle components (like address block) as declarative components.
· It is better to add javascript to a component by creating a custom component and adding javascript.
· Decorative box is a nice layout; three column template is the fusion look.
· Awesome demo; my bosses really should have been there for it. Lynn Munsinger was doing it.
· If using non-adf business components (EJB, or session bean…), you can create declarative validation on the adf binding layer….not used to much often.
· Read the fusion developer guide.
· Read the Fusion UI Developer’s Guide
· (there will be a SOA Developers Guide)
· Q&A on OTn
· JDeveloper might be “less free” if we do not deploy to WebLogic server.
· While we are waiting for FMW 11g to come on line, I need to be establishing standards, best practices, packaging task flows and app modules for reuse, creating templates, creating declarative combined components, skins, page fragments, backing bean bases, ADF/BC component bases, ….
· Active Data Services – pushes changes to data. (ADS) better than polling.
· If we deploy to Tomcat 6.0 we have to pay for license to use the ADF libraries.
· For some reasons, when I was trying to add a default value to an entity date attribute, the groovy expression that I typed in did not register as having “taken”. I typed the value in and hit enter…well actually the first thing I did was enter the expression editor, which opens a dialog. But as soon as I went away from that context and came back the value I had entered did not appear. I bet if I had just entered the default value groovy expression on the property, the value would have taken as expected. At any rate entering the value in the field and switching to the source for the page made the little green dot appear in the property sheet, but no corresponding XML attribute value appeared for the “attribute” element for hireDate attribute. So finally I quit out of JDeveloper and reentered the tool. Then I entered the groovy expression, pressed enter, and it took: got the green dot (signifying non-default value in this property), and I checked the source screen and saw the corresponding DefaultValue attribute pop up with the Groovy value in it. Yay! Oddly enough once I got this to take I had accidentally left the value type to literal…which caused an error…because “adf.currentDate” is not really a valid date, is it? But changing to expression type made the XML change to a Transient expression and the data was put in a “CDATA” thingy. Lol Then it worked.
· Do the demo on page 23, 25, 27, etc. of the class pdf for your bosses.
· I wonder if the Fusion Developer’s guide has good documentation on the aspects of the groovy language that you need to know in order to, for example, express the endpoint values of a validation rule’s range as parameters that could be incorporated into an error message.
· For column selection I am not sure what freeze, wrap do. Not sure what the point is of detatch, but maybe I would discover all this stuff down the road. The tutorial called attention to the features, but I do not see what to do with them yet; and the tutorial did not say either.
· When you do a new ViewObject on the model, and you are to select the entities you want to use, the first one you select is marked as updatable, and reference checkbox is grayed out. When you shuttle over the second entity it assumes it is a reference. Of course this maybe due that not only is employee a child of department, but department is a child of employee due to the manager FK.
· Lynn said to post test cases of bugs on JDeveloper Forums
· Need to download a slightly newer version of JDev 11g which has fixes to memory leaks and many other issues…the memory leak issue actually makes the permgen error happen, and when you try to correct for it by restarting the embedded web logic server the same error happens. If you just restart JDeveloper, the WL Server won’t start because it says there is already one running. The fix for this is either remove the java.exe process in task manager and probably restart JDeveloper…or download this new version of JDeveloper that has a patch for this and other problems.
Questions
· Page Flow versus Task Flow – which one if either is related to an open source standard? Is Page Flow simply JSF’s built in controller, or is it something else?
· Is there a version of OC4J which works with Java EE 5.0. Yes! OC4J 10.1.4 (did not know that existed.) It does not quite do JPA 3.0 right because it was produced prior to the spec being completed for Java EE…but everything else is fine. When I asked Lynn if ADF Faces Rich Client could be deployed to this, she said “no, because of differences in libraries”.
· Could developers use either JDev 10.1.3 ADF Faces, or JDev 11g Trinidad for the same app depending on their preference?
· Client/Server: what does it buy you to run the components on the client side? Server side?
· Custom login modules? Are these harder to write in WebLogic? The same? Are there more built in options.
· Can you pass parameters in via EL? Used to be only HashMaps would allow this. Other means now? (In Java EE unified EL)
· What kind of expressions are allowed in the Token Message Expression area of the validation for an entity? For example, on a range how would you access the ends of the range? Is it Groovy? Where is the list of valid Groovy expressions?
Wednesday, March 4, 2009
ADF/Portal interview with Peter Moskovits
Peter started with an overview of the Oracle products and product direction. Peter noted that Portal technology is a decade older than ADF technology, so efforts to merge them are challenging. Peter mentioned that there are a couple of kinds of portlets at work here: PDK Java Portlets, and WSRP/JSR168 Portlets. The latter is where the future is. In each case each technology offers something the other does not have, so Oracle promotes both. With Portal you have features such as runtime customization, reusable portlets, and content integration. So you can include portlets into ADF using WebCenter technology, or you can bring ADF portlets over and consume them WSRP 1.0 or 2.0 using JSF Portlet Bridge technology.
Regarding Portlet Bridge licensing…Peter says that there are two kinds of licensing for WebCenter: a WebCenter services license (meant mostly for developers) and a suite license (to get everything). The services license would be cheaper also than the suite license. If the Portlet Bridge was the only part of WebCenter that you were using, it sounded like you should get WebCenter Services license which is cheaper. The Portlet Bridge enables communication with OAS/OC4J 10.1.3.4 to obtain exposed portlets through WSRP portlet producer. If we are using 10g portal (OAS 10.1.2.0.2/Portal 10.1.4), we would need to use WSRP 1.0 (I have a question out to Peter to know if we could use ADF Faces (10g) PPR features with WSRP 1.0 or not).
Peter acknowledged that if you had to use OAS 10.1.2.0.2/Portal 10.1.4 that you would be much better off if you deployed your portletized 10g ADF Faces apps to OAS 10.1.3.4, and then consumed them with the 10.1.2.0.2 server with WSRP 1.0; rather than deploying directly to OAS 10.1.2.0.2 and having to dumb your 10g ADF Faces app down from 10.1.3.x down to 10.1.2 technology (J2EE 1.3/JDK 1.4 from J2EE 1.4/JDK 1.5).
We should not deploy portlets with the SOAP provider if we are using ADF; we should use the JSF Portlet Bridge. SOAP was only for Struts applications.
Peter and Jay both let me know that deploying a 10g ADF program was no big deal: a 3-step process, that was well documented in the 10g WebCenter Developer’s Guide.
Wednesday, February 25, 2009
Deploy ADF Rich Faces Client app to OAS 10.1.2
Shay Shmeltzer said the following:
ADF Faces Rich Client require JSF 1.2 (part of Java EE 5).Let us assume that ADF Rich Faces components uses new features of JDK 1.5 at least, even though it is compiled with JDK 1.6 (this may not be a valid assumption...if they use features that are only in 1.6...which is possible I guess). Is JSF 1.2 certified with J2EE 4 or 3? Let's assume not. So we would either have to find some weird JSF implementation that tries to implement JSF 1.2 features, while being compatible with JDK 1.4. That might be possible, but would it be profitable or interesting for anybody to do such a thing? I do not know.
OAS 10.1.2 came with a Java EE 1.3 server - you can install an OC4J 10.1.3 on it and that will bring you to Java EE 1.4 - but you still won't get the needed JSF 1.2 support.
On top of it the ADF 11g libraries were compiled with JDK 1.6 - OAS 10.1.2 uses JDK 1.4 (or maybe even older version).
What about somehow installing what is necessary into a J2EE 1.3 server to be able to process Java EE 5.0 stuff? I think it would be easier to simply use a different container...
But what if it is not. Would it be less work to extend a web server so that its core includes multiple j2ee version capabilities...than it would be to simply install a new webserver and reference that? What about manhour costs?
But what if I developed my own brand of rich faces that looked and smelled pretty much like Oracle ADF Rich Faces, but worked with OAS 10.1.2, or 10. 1.3? The end users would not have to break down and pay for licensing from Oracle (which, by the way, may be covered under their license anyway since there is some transferrance of licensing from OAS 10g to Oracle Fusion Middleware 11g...but they have not got around to checking yet...)
Given what I know this last option seems the best. Even though it would take eons for me, alone, to get the full suite of Oracle Rich Faces look-alike components implemented and debugged. But it would be fun to try...
Wednesday, February 4, 2009
Very cool demo app!
http://jdevadf.oracle.com/adf-richclient-demo/faces/components/index.jspx
My goodness: if you don't study this site you are really missing out. What a lot of work those Oracle guys and gals have done!!!!!
This demo app shows all the rich client components and what they do. You can also view the usage of each of them. Incredible.
Also if you want to download this app to study it you can do that as well...
Just click on http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html
In there is a war file you can download. Take that war file and import it into a Generic application as a project. In the new project dialog there is an option to create a new project from a war file.