Categories

Duncan Mills

Syndicate this blog

Starting to Twitter

Something to do with getting an iPhone :-) Given that the next two weeks are basically vacation it probably won't be very interesting. I'll see about integrating tweats with the blog at some point.

Goodbye setActionListener, Hello setPropertyListener

So what did I learn today? This is always a good question to ask yourself and it's funny how sometimes the most fulfilling learning experiences can be totally random and unexpected. I was browsing for some information on ADF contextual events, which lead to me noticing a typo in the JDeveloper help file which in turn lead me to read a bit more of the name help topic and suddenly I learn something new. I love it!
In this case it was a code sample reference which mentioned <af:setPropertyListener>. Although I'd undoubtedly seen this mentioned before, it had just never registered as significant, but such was my mood this evening that I segued into the topic and started to drill down. So it turns out that this component is a sort of super version of our old friend <af:setActionListener>, but it adds much more control to the job of setting managed values. Unlike <af:setActionListener> which is restricted to operating in response to an action in the sense of commandButton or commandLink clicks, it seems that <af:setPropertyListener> is a much more promiscuous beast and can be configured to react to many different types of events and presumably nested within many more types of components as well. Unlike setActionListener which only sports a FROM and TO, setPropertyListener has an additional TYPE attribute which can be set to "action" but also many other event types. The legal values are: action, dialog, disclosure, focus, launch, launchPopup, poll, popupFetch, query, queryOperation, rangeChange, regionNavigation, return, returnPopupData, returnPopup, rowDisclosure, selection, sort, and valueChange.
At this stage I've not been able to drill down further into the possibilities of this as yet, but I can already conceive of a whole bunch of use cases where it might come in handy. Documentation is a little thin on the ground for this component right now but it all looks fairly self explanatory..