Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 31023 invoked from network); 2 May 2005 06:23:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 May 2005 06:23:57 -0000 Received: (qmail 78545 invoked by uid 500); 2 May 2005 06:25:09 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 78491 invoked by uid 500); 2 May 2005 06:25:08 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 78462 invoked by uid 99); 2 May 2005 06:25:07 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=RCVD_BY_IP,WEIRD_QUOTING X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of sebastien.arbogast@gmail.com designates 64.233.162.202 as permitted sender) Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.202) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 01 May 2005 23:25:07 -0700 Received: by zproxy.gmail.com with SMTP id 34so2209255nzf for ; Sun, 01 May 2005 23:23:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PWnobr7sMVFE82i1KhJTgqcDN4tTQfA9W+cK8dZSxHuIREjv2PtdhN75jOz818PMZPm1x1mqOS6ys8u7iTTi4uMiiiQcsHODdjDmk7zmNA2LGXMFoz41McgYptJGRRuEqcfORmQDPd/f5kzE7dvT66/55IWuoupYK60OfbfB27A= Received: by 10.36.10.18 with SMTP id 18mr488959nzj; Sun, 01 May 2005 23:23:41 -0700 (PDT) Received: by 10.36.20.12 with HTTP; Sun, 1 May 2005 23:23:41 -0700 (PDT) Message-ID: Date: Mon, 2 May 2005 01:23:41 -0500 From: Sebastien Arbogast Reply-To: Sebastien Arbogast To: Cocoon users list Subject: Re: Authentication alternatives In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > If you want to use the session framework, it's much more complicated.. > Here's an example on two wrappper functions to get and set a string in > a path inside the session framework. Pay attention on two things: a > session can have many diferent contexts (for different kind of data, > etc.), and to locate data, you use xpath. If a context is not defined > and you try to access to it, it'll throw an exception, so be careful. >=20 > function setData(path,value) { > var contextManager=3Dcocoon.getComponent(Packages.org.apache.coco= on.webapps.session.ContextManager.ROLE); > var myContext; > if (contextManager.existsContext(site)) > myContext=3DcontextManager.getContext("mycontext"); > else myContext=3DcontextManager.createContext("mycontext","",""); > myContext.setAttribute(path,value); > cocoon.releaseComponent(contextManager); > } I'm trying to use Nacho's two wrapper functions but there is just one thing I don't understand : what does the "site" parameter stand for in call to contextManager.existsContext(site) ? Where does its value come from ? Thx in advance... --=20 Sebastien ARBOGAST --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org