Quoting "Piroumian, Konstantin" <[EMAIL PROTECTED]>:
> ...
> > > I've implemented some configuration possibilities for the
> LangSelect,
> > > but
> > > I'm not sure that they can be very useful in the case, when lang for
> the
> > > session differs from the lang in a cookie. Now the action can be
> used as
> > > this:
> > >
> > > <map:action name="lang-select"
> > > src="org.apache.cocoon.acting.LangSelect">
> > > <!-- Should the action create a session to store the
> language
> > > code. -->
> > > <create-session>true</create-session>
> > > <!-- Should the action store the lang code in the session
> -->
> > > <store-in-session>true</store-in-session>
> > > <!-- Should the action store the lang code in a cookie -->
> > > <store-in-cookie>true</store-in-cookie>
> >
> > I can see the need for a <store-in-request> as an request attribuite
> as
> well
> > (for those not using sessions nor cookies at all).
>
> Ok. I will add that.
Thanks.
>
> > > <!--
> > > I am going to add other configuration params:
> > > cookie-age - the cookieAge attribute of the cookie with
> the
> > > lang
> > > code
> > > param-name - the name of the request param, the session
> > > attribute and the name of the cookie.
> > > Now it's hard coded and equals to 'lang'.
> > > -->
> > > </map:action>
> > >
> > > Maybe it's better to make these settings params, so for some
> pipelines
> > > thay
> > > can be defined dynamicaly from the sitemap?
> >
> > I think it's better to have config and parameters as well. Former is
> meant
> as
> > default behaviour later as runtime overriding value. I've made that
> for
> the
> > TraxTransformer as well. This eliminate the need to define differently
> > configured components of the same implementation where you have
> default
> for the
> > usual case and are able to change them in the pipeline for special
> use.
> >
> > > Btw, why the syntax for configuration and sitemap params are
> different?
> > > Why
> > > not to use:
> > > <parameter name="create-session" value="true" />?
> >
> > The configuration is a hierarchical structure (XML fragment) where as
> the
> > Parameters are name/value pairs.
>
> So, I have to implement Configurable interface (as it is now) and at the
> same time process parameters passed to the act method, right?
Yes, that would be a convenient (have a look at the TraxTransformer).
> Btw, in the main sitemap there is a match with pattern "i18n", but there
> is
> no corresponding files (navigation.xsp, etc.). Won't it have a conflict
> with
> the separate pipeline for my i18n sample? I think that either it must be
> removed or it'd better that the author (is that you Giacomo?) add his
> i18n
> sample to the CVS.
Oops. left it unintentionally. Will remove it soon.
Giacomo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]