> From: Jeff Turner [mailto:[EMAIL PROTECTED]]
> On Tue, Oct 08, 2002 at 10:26:42AM +0200, Carsten Ziegeler
> wrote: [snip defaulting example]
> > >
> > Ok, thanks for your help - sorry, I'm jumping into this a
> little bit
> > late, but I have to question this concept. As far as I understand
> > this, the chaining is configured in the cocoon.xconf. Each Input
> > Module is configured with a "default" input module in the case it
> > doesn't know the value for a key, right?
>
> That's how I think it should work, but currently it's a bit
> different..
>
> Right now, the 'default' module is configured so that when a
> request is made to it, it will preferentially use some other
> module, only falling back to it's own default values. Here's
> the definition:
>
> <component-instance
>
> class="org.apache.cocoon.components.modules.input.DefaultsMetaModule"
> logger="core.modules.input" name="defaults">
> <input-module name="request-param"/>
> <values>
> <skin>defaultSkin</skin>
> <base-url>http://localhost:8080/cocoon</base-url>
> </values>
> </component-instance>
>
> So the user would say {default:skin}, and get the 'skin'
> request parameter, or if not present, 'defaultSkin'.
>
> IMO this is backwards. The user should use {request:skin},
> not {defaults:skin}.
>
> What do people think? Chris?
I imagine this a little different, e.g.:
<component-instance
class="org.apache.cocoon.components.modules.input.SkinModule"
logger="core.modules.input" name="skin">
<input-module name="request-param"/>
<input-module name="skin-defaults"/>
</component-instance>
The user uses {skin:name} and the SkinModule checks request parameters first
and then skin-defaults input module to obtain the value of 'name' attribute.
Isn't this more obviouse to the end user?
Konstantin
>
>
> --Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]