I hope I understood your problem.
I had a similar problem with parameters (look for 'Confused about Actions').
To get access to a parameter in a different hierachy, I use {../1}. Perhaps
this will solve your first question (try {../myvar_dbvars1}).

To propagate session values to the sitemap, I think you have to write an
action for that (I don't know if there's such an action in cocoon right now:

public void act ... {

Map sitemapParams = new HashMap ();
for (Enumeration e = request.getSession ().getAttributeNames (); e.hasNext
()) {
    String key = e.nextElement ().toString ();
    if (request.getSession ().getAttribute (key) != null)
       sitemapParams.put (key, request.getSession ().getAttribute
(key).toString ());
    }
return sitemapParams;
}

No session attributes would be deleted. You could easily modify this code so
that only your attributes would be propagated (in this solution only
String-attributes would be useful).

If this doesn't help you feel free to write me directly.

JOERN_HEID

-----Ursprüngliche Nachricht-----
Von: Paolo [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 10. September 2001 09:27
An: [EMAIL PROTECTED]
Cc: Cocoon-Users
Betreff: Sitemap parameters scope and non-destructive session parameters
propagation


I am working with Cocoon but I have some problems with sitemap variables
scope. It seems that Sitemap Parameters propagated from db-authenticator
actions are not inherited into selectors or other db-authenticator
actions. Please look at this code and the scope of myvar_dbvars1
(propagated by db-authenticator action) to the session and Sitemap:

<map:act type="db-authenticator">
        <map:parameter name="descriptor" value="dbvars1.xml"/>
        <map:select type="session">
        <map:parameter name="state-key" value="myvar_dbvars1"/>

                <map:when test="customer">
                        <map:act type="db-authenticator">
                                <map:parameter name="create-session"
value="no"/>
                                <map:parameter name="descriptor"
value="dbvars2.xml"/>
                                <map:redirect-to uri="{myvar_dbvars1}"/>
                        </map:act>

                        <map:act type="session-invalidator">
                                <map:redirect-to uri="login"/>
                        </map:act>
        </map:when>

                <map:otherwise>
                        <map:redirect-to uri="{myvar_dbvars1}"/>
                </map:otherwise>
        </map:select>
</map:act>

Then, my questions:
1) is it possibile to propagate Sitemap parameters into child elements
of sitemap?
2) is it possibile to check and propagate session attributes to Sitemap
without deleting an existing session?

Thanx!

ByeBye,
Paolo Scaffardi
AIRVENT SAM S.p.A.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to