Grzegorz Kossakowski skrev:
Grzegorz Kossakowski napisaƂ(a):
Hello,

I've tried Forms blocks using /core/cocoon-webapp block(?) lately and
I've found that resources loading does not work. I would like to fix it
but in the manner of using blocks-fw as it seems to be mature enough. It
is, right? So my questions are:
1. Should block resources be served directly by block owning them? I
mean, should request for some javascript files be dispatched (by
blocks-fw dispatcher) directly to forms block and some matcher in there
would catch up the request?
2. Or maybe always block that uses forms block should catch the request
for resources and redirect them (by using some source from block-fw?) to
the forms block?
3. What about paths? Are they supposed to be absolute? If not, which
block (and phase of processing request) is responsible for link
rewriting and what technique is advised?

Next question is about exposing resources of one block the others for
internal usage. For example, in
cocoon-forms-sample/resources/forms-samples-styling.xsl we have 2
inclusions:
  <xsl:include
href="resource://org/apache/cocoon/forms/resources/forms-page-styling.xsl"/>
  <xsl:include
href="resource://org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl"/>

As far as understand the whole block architecture it should be changed
to something like:
  <xsl:include
href="block:cocoon-forms-impl:resources/forms-page-styling.xsl"/>
  <xsl:include
href="block:cocoon-forms-impl:resources/forms-advanced-field-styling.xsl"/>

At least that suggest Daniel's presentation (slide 22). Is this concept
still valid?

Yes.

If so, is it achievable and how?

It is achievable. Take a look at the server-service-sample http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-sample/.

http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-sample/src/main/resources/META-INF/cocoon/spring/cocoon-servlet-service-sample-servletService1.xml is a configuration of a service servlet that connects to another servlet service. And http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-sample/src/main/resources/COB-INF/test1/sitemap.xmap is a sitemap using the connections.

If not, is it hard to make it?

Sorry for asking so much questions but I would really like to understand
how all these things should be done along with the usage of new, shiny
features of 2.2 :-)

No need to be sorry, I'm happy that people are interested in the stuff. And as long as I don't write any documentation its my own fault ;)

/Daniel

Reply via email to