Luca Morandini pisze:
Since Grzegorz is in the mood of bestowing upon us the arcana of SSF, I have an use case that may be of interest:

1) Suppose you have an admin UI (some static pages, a login form, some admin forms). 2) Suppose you want your users to add specialized forms and static pages for configuring some service of theirs.

How would you do it using a "father" block for general forms/pages and "children" blocks for specialized forms/pages ?

Father/parent and child block is a really bad nomenclature. More appropriate is just admin block (the one described in point 1) and few admin-foo, admin-bar blocks that are *extensions* not *children* of admin block. They provide just extensions that admin block /aggregates/ the view but not the control (see below).

This nomenclature has been already discussed between me and Patrick, see[1].
More broadly speaking, I would advise to take a look at the whole thread[2] because me and Patrick has been discussing quite the same setup (providing some additional Forms coming from optional blocks). I would like to emphasize Inversion of the Control (Flow) issue we have been discussing because it's a hidden spectre that you will soon or later encounter in such design. :-)

As far as I understand, this boils down to let the "father" block know about the "children" and let it access them somehow (like a DirectoryGenerator spanning all blocks declared in the servlet-service.xml to collect all the static pages and show them in a menu).

Please, alert me if I say something insane ;)

As you see from Vadim's response it's not insane by any means and we do something like that in our samples already! :)

PS. I've tried to discuss (evangelize) all sort of these things during last Cocoon GT but I failed miserably because of my weak preaching skill and lack of working demo. Back in September of 2007 that was just an idea in my head and even SSF lacked necessary features contrary to what we have now.

[1] http://article.gmane.org/gmane.text.xml.cocoon.user/63694
[2] http://thread.gmane.org/gmane.text.xml.cocoon.user/63674

--
Grzegorz Kossakowski

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

Reply via email to