You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2006/11/21 18:46:14 UTC
2.2 replacement for GlobalInputModule?
Hi,
GlobalInputModule in 2.1.x is @deprecated, "This module will be
replaced by a better version in 2.2". Indeed, it's gone from trunk
— what's the replacement?
Thx-a-lot,
—ml—
Re: 2.2 replacement for GlobalInputModule?
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 26, 2006, at 5:46 AM, Carsten Ziegeler wrote:
> Does this help?
Yes, I think it does... see below...
> Hmm, ok, the <map:global> section is still supported in 2.2!
Really... OK, I'll look for it.
> But I think
> its not attribute based, so you have to write:
> <map:global>
>
> <something>context://this/that/{some-module:xxx}/foobar.xml</
> something>
> </map:global>
>
> The other solution is to define a properties file with the property:
> something=context://this/that/{some-module:xxx}/foobar.xml
I liked the first solution because my first instinct is to prefer that
the sitemap variable substitution syntax be confined to the sitemap
itself. But on second thought, I like the additional flexibility
afforded by extending support to configuration via properties.
> Now, regardless of which approach you use, you have to take care that
> the reference to your "some-module" gets resolved at the right moment.
Right. OK, I'll have another squint at the code. Thanks for the
guidance.
Cheers,
—ml—
Re: 2.2 replacement for GlobalInputModule?
Posted by Carsten Ziegeler <cz...@apache.org>.
Mark Lundquist wrote:
> On Nov 25, 2006, at 10:15 AM, Carsten Ziegeler wrote:
>
>> Hmm, my question is: what do you really want? :) Where do you want to
>> define what?
>
> Hi Carsten...
>
> The sitemap variable syntax only works in attributes, right?
>
> To recap from a previous message, I wanted to add an attribute-driven
> form to GlobalInputModule so that you could say something like this:
>
> <map:component-configurations>
> <map:global>
> <something value="context://this/that/{some-module:xxx}/foobar.xml">
> <map:global>
> <map:component-configurations>
>
> and I'm (a) looking for an alternative in the post-GlobalInputModule
> world, or (b) failing that, lobbying for the reinstatement of
> GlobalInputModule.
>
Hmm, ok, the <map:global> section is still supported in 2.2! But I think
its not attribute based, so you have to write:
<map:global>
<something>context://this/that/{some-module:xxx}/foobar.xml</something>
</map:global>
The other solution is to define a properties file with the property:
something=context://this/that/{some-module:xxx}/foobar.xml
Now, regardless of which approach you use, you have to take care that
the reference to your "some-module" gets resolved at the right moment.
As long as you take care of this yourself (or use some component which
does this for you), you're fine.
Does this help?
Carsten
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: 2.2 replacement for GlobalInputModule?
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 25, 2006, at 10:15 AM, Carsten Ziegeler wrote:
> Hmm, my question is: what do you really want? :) Where do you want to
> define what?
Hi Carsten...
The sitemap variable syntax only works in attributes, right?
To recap from a previous message, I wanted to add an attribute-driven
form to GlobalInputModule so that you could say something like this:
<map:component-configurations>
<map:global>
<something value="context://this/that/{some-module:xxx}/foobar.xml">
<map:global>
<map:component-configurations>
and I'm (a) looking for an alternative in the post-GlobalInputModule
world, or (b) failing that, lobbying for the reinstatement of
GlobalInputModule.
thx,
—ml—
Re: 2.2 replacement for GlobalInputModule?
Posted by Carsten Ziegeler <cz...@apache.org>.
Mark Lundquist wrote:
> Or, trunk still has the DefaultsModule. Maybe that's what I really
> want here?
Hmm, my question is: what do you really want? :) Where do you want to
define what?
Carsten
> —ml—
>
> On Nov 24, 2006, at 11:12 AM, Mark Lundquist wrote:
>
>> On Nov 21, 2006, at 5:19 PM, Mark Lundquist wrote:
>>
>>> I was actually hoping to add an attribute-driven form form to
>>> GlobalInputModule, so that you could have, e.g.
>>>
>>> <some-var value="/whatever/{some-module:xxx}/foo/bar"/>
>>>
>>> (typically the input module would be a PropertyInputModule)...
>> Yeah, and, you know... I'm still thinkin' that would be nice. How
>> about:
>>
>> (a) Putting back the GlobalInputModule in trunk;
>>
>> and,
>>
>> (b) Referencing the Settings items using a different scheme, e.g.
>> "{settings:whatever}"
>>
>> ??? WDYT?
>> —ml—
>>
>>
>
>
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: 2.2 replacement for GlobalInputModule?
Posted by Mark Lundquist <ml...@wrinkledog.com>.
Or, trunk still has the DefaultsModule. Maybe that's what I really
want here?
—ml—
On Nov 24, 2006, at 11:12 AM, Mark Lundquist wrote:
>
> On Nov 21, 2006, at 5:19 PM, Mark Lundquist wrote:
>
>> I was actually hoping to add an attribute-driven form form to
>> GlobalInputModule, so that you could have, e.g.
>>
>> <some-var value="/whatever/{some-module:xxx}/foo/bar"/>
>>
>> (typically the input module would be a PropertyInputModule)...
>
> Yeah, and, you know... I'm still thinkin' that would be nice. How
> about:
>
> (a) Putting back the GlobalInputModule in trunk;
>
> and,
>
> (b) Referencing the Settings items using a different scheme, e.g.
> "{settings:whatever}"
>
> ??? WDYT?
> —ml—
>
>
Re: 2.2 replacement for GlobalInputModule?
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 21, 2006, at 5:19 PM, Mark Lundquist wrote:
> I was actually hoping to add an attribute-driven form form to
> GlobalInputModule, so that you could have, e.g.
>
> <some-var value="/whatever/{some-module:xxx}/foo/bar"/>
>
> (typically the input module would be a PropertyInputModule)...
Yeah, and, you know... I'm still thinkin' that would be nice. How
about:
(a) Putting back the GlobalInputModule in trunk;
and,
(b) Referencing the Settings items using a different scheme, e.g.
"{settings:whatever}"
??? WDYT?
—ml—
Re: 2.2 replacement for GlobalInputModule?
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 21, 2006, at 11:50 AM, Leszek Gawron wrote:
>> GlobalInputModule in 2.1.x is @deprecated, "This module will be
>> replaced
>> by a better version in 2.2". Indeed, it's gone from trunk — what's
>> the
>> replacement?
>
> org.apache.cocoon.configuration.Settings. all of the settings placed in
> /META-INF/cocoon/properties/*.properties and
> block/config/properties/*.properties are available (among other places)
> in sitemap using {global:propertyName} syntax.
Hi Leszek, thanks... that is interesting, and good... I guess...
I was actually hoping to add an attribute-driven form form to
GlobalInputModule, so that you could have, e.g.
<some-var value="/whatever/{some-module:xxx}/foo/bar"/>
(typically the input module would be a PropertyInputModule)...
—ml—
Re: 2.2 replacement for GlobalInputModule?
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Mark Lundquist wrote:
> Hi,
>
> GlobalInputModule in 2.1.x is @deprecated, "This module will be replaced
> by a better version in 2.2". Indeed, it's gone from trunk — what's the
> replacement?
org.apache.cocoon.configuration.Settings. all of the settings placed in
/META-INF/cocoon/properties/*.properties and
block/config/properties/*.properties are available (among other places)
in sitemap using {global:propertyName} syntax.
--
Leszek Gawron CTO at MobileBox Ltd.