was Re: [jira] Created: (COCOON-1943) [Patch] Parameters in
blocks-protocol URIs get decoded too early
Alexander Klimetschek (JIRA) skrev:
...
(A little bit Off-topic): The general point here is that I am calling a form that is handled in the
super block. Since you cannot pass on request parameters from a POST call (that comes from the browser)
to the other (super) block called via the blocks-protocol (because the only interface you have is the
Source, where you can only pass information via the URI), you have to put all parameters in the uri. I
have written a simple input module that creates a "param1=alpha¶m2=beta" string from
another input module (preferrably request-param) so that you simply call:
"block:super:/dosomething?{params-to-uri:request-param}". This might be integrated into
Cocoon as a standard InputModule.
While your input module can be usable in its own right I think that we
should make the block protocol postable. Besides that it simplify
reusing form handling as you describe above. I think that it is
generally useful to make it possible to let blocks contain web services
that can be called through the block protocol and be used as some webapp
internal web services.
To achieve this the o.a.c.blocks.util.BlockCallHttpServletRequest needs
to be extended with input handling and
o.a.c.blocks.components.BlockSource need to implement ModifiableSource
and o.a.c.blocks.BlockProtocol needs to take care of the input.
I extended the HttpClientSource to be postable long time ago
(http://issues.apache.org/jira/browse/COCOON-871) as part of some code
for handling web service calls within pipelines. I never applied the
patch as we had some disagreement about if it was a good idea to use web
services from Cocoon in this way.
The critique was mainly about my extension of the
SourceWritingTransformer, I still think it would be a good idea to have
postable sources and especially to make the block protocol postable.
/Daniel