Issue Details (XML | Word | Printable)

Key: SHALE-351
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Craig McClanahan
Reporter: Craig McClanahan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

Support events from DialogContextManager in addition to DialogContext

Created: 04/Dec/06 06:00 PM   Updated: 23/Jan/07 04:40 PM
Return to search
Component/s: Dialog
Affects Version/s: None
Fix Version/s: 1.0.4


 Description  « Hide
The current dialog APIs make it possible to register for fine grained events on a particular DialogContext, but not on events from DialogContextManager. In particular, it is not currently possible to be notified when a new DialogContext instance is created via navigation. Address this by adding eventing to DialogContextManager along the following lines:

* New DialogContextManagerListener interface with onCreate() and onRemove() methods

* New AbstractDialogContextManager that implements the listener registration stuff
  (analogous to AbsractDialogContext for context level event)

* Modify the two DialogContextManager implementations to extend this new base class
  and to call the event firing methods at the right times

* Unit tests for all of the above (of course :-)

* For naming consistency, consider renaming DialogListener to DialogContextListener
  and associated ripple effects. We can minimize transition impacts on current apps
  by leaving a deprecated DialogListener interface that simply extends DialogContextListener
  (and so on).


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Rahul Akolkar added a comment - 04/Dec/06 08:02 PM
Since the DialogListener has never been part of a release, perhaps we can consider renaming it without leaving the package with deprecated classes in its first release itself?

As a purely stylistic comment, AbstractDialogContextManagerListener is about as long of a classname as I personally prefer, but I have no better ideas ATM either, and it seems consistent, so lets just make progress.

I take it this is assigned to you? In any case, I'd be happy to update the dialog-scxml module once the base is in place, if that helps.

Craig McClanahan added a comment - 04/Dec/06 08:17 PM
Regarding renaming DialogListener, I agree with the "just rename it" approach. I had forgotten we haven't actually released this yet.

Regarding AbstractDialogContextManagerListener, I agree with you about the length ... fortunately it only needs to get used twice :-). I'll also go ahead and make the three-line change to SCXMLDialogManager.

I also noticed a couple of places where we haven't followed the JavaBeans *conventional* patterns (not defined in the specs, but seems to be commonly recognized by IDEs) of being able to call getFooListener() and get an array of registered listeners back. There's also a couple of places we need to clean up synchronization, or add some missing ones.

A remaining design issue is a bootstrapping one ... how do you find out when a DesignContextManager gets created and adde to a user's session? (And, likewise, when it goes away.) That will probably require one more sort of listener declaration, probably with a PhaseListener style registration.

Craig McClanahan made changes - 04/Dec/06 08:17 PM
Field Original Value New Value
Assignee Craig McClanahan [ craigmcc ]
Repository Revision Date User Message
ASF #482450 Tue Dec 05 02:02:32 UTC 2006 rahul s/DialogListener/DialogContextListener/ and alphabetize imports. Part of:
SHALE-351
Files Changed
MODIFY /shale/framework/trunk/shale-dialog-scxml/src/main/java/org/apache/shale/dialog/scxml/SCXMLDialogContext.java

Repository Revision Date User Message
ASF #482452 Tue Dec 05 02:09:45 UTC 2006 rahul Let the abstract be abstract.
SHALE-351
Files Changed
MODIFY /shale/framework/trunk/shale-dialog/src/main/java/org/apache/shale/dialog/base/AbstractDialogContextManagerListener.java

Repository Revision Date User Message
ASF #482746 Tue Dec 05 19:26:26 UTC 2006 rahul Register dialog data as a DCL at the onset, if it is one.
SHALE-351
Files Changed
MODIFY /shale/framework/trunk/shale-dialog-scxml/src/main/java/org/apache/shale/dialog/scxml/SCXMLDialogContext.java

Craig McClanahan added a comment - 12/Dec/06 07:00 AM
The bootstrapping concern has been addressed. In addition, the most common use cases for dialog events have been dealt with by automatically registering the "data" object as a DialogContextListener if it implements this interface.

Craig McClanahan made changes - 12/Dec/06 07:00 AM
Fix Version/s 1.0.4-SNAPSHOT [ 21740 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Rahul Akolkar made changes - 23/Jan/07 04:40 PM
Fix Version/s 1.0.4-SNAPSHOT [ 21740 ]
Fix Version/s 1.0.4 [ 21790 ]
Jeff Turner made changes - 09/Aug/07 07:15 AM
Workflow Struts [ 39003 ] Struts - editable closed status [ 41681 ]
Antonio Petrelli made changes - 08/Jan/09 08:56 AM
Workflow Struts - editable closed status [ 41681 ] Struts - editable closed status (temporary) [ 46024 ]
Antonio Petrelli made changes - 08/Jan/09 09:08 AM
Workflow Struts - editable closed status (temporary) [ 46024 ] Struts - editable closed status [ 53050 ]