footh wrote:

Ah, I see where you're getting at.  Create another
javaflow, register it in the sitemap and let cocoon
take care of it.
I'm pretty sure it is even simpler than that. If your Javaflow class references another class that also extends AbstractContinuable it will also be able to participate. What you can't do is call a method in a class that does not implement AbstractContinuable and then try to instantiate a new AbstractContinuable. I'm not even sure that you can call a method in the AbstractContinuable that the non-continuable was called from.

I may end up doing that and moving the form code over
to a separate class, but I really don't see much
improvement over simply relocating the big
if...then...else.

The way I was trying to do it was to have an xml
config file that associated a form url with a class. Then the main javaflow would call the class based on
the request url.  The class would then execute the
code that instantiates and shows the form (and does
other stuff specific to the form).  I liked this
method because if I needed to add another form, I
could just create a new class and add it to the config
file.
Well, I was playing around with drools and wrote a generic javaflow method that invoked the rules engine. Each rule would identify a url to invoke or create a form to show. When the rule engine returned the Javaflow would determine what it was supposed to do (there are really only a few options) and then it did it. It would then loop again until it got a "show last".

While this worked, the rule syntax turned out to be very unintuitive so we have dropped that approach. Since then we have defined an XML syntax that is similar in some respects to JSF navigation rules, but it also includes definitions of the actions to perform. In my "infinite spare time" I'll be implementing this on top of Javaflow. In this way we will have a "stateful event controller". Perhaps this is also what you are looking for?

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to