cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: [Proposal] Input modules: access syntax and naming
Date Wed, 18 Sep 2002 16:12:56 GMT
On 17.Sep.2002 -- 11:37 PM, Konstantin Piroumian wrote:
> Hi folks!
> 1) I've been recently trying to modernize the Forrest's sitemap using input
> modules and found out that there is no input module for request properties
> (such
> as context path, locale, query string,etc.). And the name used for the
> request parameters module is misleading in this regard.
> I don't remember how the discussion about module names ended, but I'd like
> to propose to change the names for modules as below:
>     1. request - for RequestModule (I volunteer to implement it), to provide
> access to context path, locale, uri, url, query string     and all other
> properties of Request interface.
>     2. request-param - either of this for request parameters
>     3. request-attr - either of the for request attributes
>     4. session - for a module for Session properties, such as id, isNew,
> etc.
>     5. session-attr - for session attributes
>     6. application - for a module for application context (Context)
> properties, in case of web environment it's the ServletContext properties.
>     7. application-attr - web application context attributes (servlet
> context attributes)
> If we agree on this, I am volunteering to implement the RequestModule (or
> maybe RequestPropertiesModule) and if I have time then I'll also implement
> the modules related to session and application.

Konstantin, this is a good idea and it would really improve InputModules a lot.
It would be great if you could find the time.

> 2) Now a question:
> <question>
> First usage of input modules in Forrest for site skin selection showed me
> that having passive modules (that implement only the 'getter' functionality)
> is not sufficient. In case of the skin when user chooses to use another
> 'skin' he should pass a 'skin' request parameter. But the problem is that
> this parameter is not retained through the user's session and you should
> either generate all the site links with this parameter or somehow set a
> session attribute or a cookie
> The same is true for the user's locale. I've been thinking about replacing
> the LocaleAction with an input module, but I am in doubts if I should set
> user's locale in an input module? This involves setting a request or session
> attribute and/or a cookie.
> </question>

There's the OutputModule interface for setting values. A class could implement
both interfaces, but one would have two instances floating around. As Sylvain
suggested, an action would be right I think.

> Any suggestion or a better solution is appreciated.

C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

To unsubscribe, e-mail:
For additional commands, email:

View raw message