As I mentioned yesterday, I’ve been “wowed” by some of the new stuff floating around in the JDeveloper 11 preview release that came out the other day. The ADF Faces components (both the new and the old) have some great stuff. I’m also excited to see a true templating capability, which looks to be much better than the old af:region; I haven’t had a chance to dive into this yet, so templates is going to have to be a topic for another day.
Another interesting new addition is the concept of an ADF Task Flow. Again, I haven’t had the time yet to do a “deep dive,” but task flows look to me like the JSF faces-config.xml on steroids – instead of one large faces-config, we can have multiple re-usable adf task flows that can then be pieced together. There’s even a new memory scope, the task flow scope, that is longer than request but shorter than session to facilitate this. I’m going to have to spend a bit of time understanding this one before I post the details.
The instant “wow” factor in JDev 11 is the ADF Faces components. In addition to some really cool visualization components (Flash-y graphs, bar charts, gannt charts, etc), the old venerable ADF Faces components have gotten a great face lift. The applications created using JDev 11 have a much more responsive, AJAX-y, Web 2.0 feel. Today, I thought I’d take one of the components I use most often, af:table, and give a preview of how it has changed in this release.
The first thing I noticed is that there is no more selection or actions facet in the table; hmmm, how am I going to perform the typical “select a row and edit it” or “create a new row” buttons? After some poking around the docs, I discovered a new component (find it in the layout section of the control pallete) called “af:panelCollection:”
The af:panelCollection provides a container for af:table that allows for toolbars and menus (!) that allow you to act on the table. After putting one of these on my page, I dragged-and-dropped a view object from the data control pallete as an af:table. The resulting dialog, although similar to the one in 10.1.3.2, has an interesting new checkbox, “Filtering.” Wonder what this does…..
After ok-ing the dialog, it’s time to run and see it. There are so many new things to look at just on this simple page… First of all, selecting an item is just as simple as clicking in some of the blank space in the row. The selected row is automatically highlighted:
This “highlight the selected row” is something that I’ve seen asked over and over again on the OTN JDeveloper forum, so it’s a nice thing. It’s not all good, in my opinion; if you look at the screen shot, there’s precious little “blank space” to click – it was pretty hard to select the row in this case. It’s also a bit less obvious that in 10.1.3 how to select the row; there is no “Select and…” text floating up there on the top.
Next up is sorting; just hover the mouse over the column label and:
Nice up-and-down sorting indicators. Right above the column labels is the filtering. Just type a letter in the filter area, press enter, and:
Hiding and showing columns is pretty easy too:
Re-ordering columns by dragging and dropping them is supposed to work (I got the nice drag-and-drop effect), but got stuck:
It is a preview release, after all. The next thing I went looking for was the range scrolling. Where is that “next 10, previous 10?” It turns out, you just move the scroll bar; rows are fetched on demand:
That alone is worth the price of admission. The final thing I wanted to show was how to add a CreateInsert item to the menu to support creating a new row in the table. First, I simply dragged and dropped the Create operation from the data control pallete inside of an af:menu in the menus facet of the af:panelCollection:
Next, I needed to change the binding from Create to CreateInsert. Now where is that pageDef? Oh, there it is, hiding in the “bindings” tab of the JSF editor window: