On Wed, 8 Jan 2003, Ovidiu Predescu wrote:

> Unfortunately Tony, there isn't any documentation for the control flow.
> Yet!

I already started a Flow page on the Wiki... feel free to add whatever.

> I've started a project at work which uses the control flow. I'll
> document the control flow as part of explaining it to my colleagues. In
> the meantime, don't be shy and ask your questions on the mailing list.

Looking forward to reading it all! :)  More comments below...

> > var userRegistry =
> > Packages.samples.flow.prefs.logic.UserRegistry.getUserRegistry();
>
> UserRegistry is a class defined and used by the 'prefs'

Got it.  I assume any Java objects can be instantiated this way.  Where
is the code that defines "Packages" however?  Is it part of Rhino, or is
it being created elsewhere?  It seems like an odd automatic process...

> > and thinks like
> >
> > cocoon.createSession();
>
> 'cocoon' is a special object made available to JavaScript scripts by
> control flow engine. For a list of methods and attributes it has,
> checkout the org.apache.cocoon.components.flow.javascript.JSCocoon
> class.

Found it already.. I seem to be on the right track.  It's funny, I'll post
something to a list, and then two minutes later I'll track down where all
the stuff was... oh well :)

I've tracked down JSCocoon and JSLog.  I've already found how Rhino binds
the specially-named functions in the Java class to methods of the JS
objects.  I now see the a bunch of methods of cocoon such as:

        cocoon.getEnvironment()
        cocoon.getRequest()
        cocoon.getSession()

Along with load(), createSession(), etc.  I'm also able to follow along
with the prefs.js sample.  I do have a few questions about a couple lines
I've found in prefs.js though:

        login = cocoon.request.getParameter("login");
and
        login = cocoon.request.get("login");

a) What's the difference between the two?

b) Where is cocoon.request being created?

> Besides JSCocoon, checkout the system.js file in the same directory
> with JSCocoon. It contains the "special" functions defined by the
> control flow engine.

Bingo.  I see sendPage(), etc.  Thanks for the help & pointers!

Regards,

Tony


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to