cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "julien bloit" <Julien.Bl...@ircam.fr>
Subject Re: shopping cart : creating a new context
Date Wed, 29 Oct 2003 15:01:31 GMT
Ok, the session creation seems to work with the session action, however, it
seems I can't get the session transformer to work in my pipeline :

<map:pipeline>
    <map:match pattern="ajout">
        <map:act type="session"/>
        <map:generate src="contexts/new_panier.xml"/>
        <map:transform type="session"/>
        <map:serialize type="xml"/>
    </map:match>
</map:pipeline>

where new_panier.xml is :

<?xml version="1.0"?>
 <resource xmlns:session="http://cocoon.apache.org/session/1.0">
   <session:createcontext name="mycart"/>
   <session:setxml context="mycart" path="/">
       <cart>
           <item_id>first item</item_id>
           <item_id>second item</item_id>
       </cart>
   </session:setxml>
  <session:getxml context="mycart" path="/"/>
</resource>

I always get the following output (obviously, no transformation
happening...) :

<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns:session="http://cocoon.apache.org/session/1.0">
   <session:createcontext name="mycart"/>
   <session:setxml context="mycart" path="/">
       <cart>
           <item_id>first item</item_id>
           <item_id>second item</item_id>
       </cart>
   </session:setxml>
  <session:getxml context="mycart" path="/"/>
</resource>

What am I missing ?? feel like a dummy...

> Hi Julien,
>
> I missed the beginning of this thread (just read it in the archive).
Before
> creating a context to store data in you must create a session for the
user.
> Check this page for details on the Session action:
> http://cocoon.apache.org/2.1/userdocs/actions/session-action.html
>
> You don't need any authentication for this.
>
> HTH
>
> Matthew
>
> > -----Original Message-----
> > From: julien bloit [mailto:Julien.Bloit@ircam.fr]
> > Sent: Wednesday, October 29, 2003 1:04 PM
> > To: users@cocoon.apache.org
> > Subject: Re: shopping cart : creating a new context
> >
> >
> > Thanks Peter,
> > Before I dig into the problem a little more, can you tell me if you were
> > able to create a session context without any user identification
process?
> >
> > thanks for your help
> > Julien
> >
> > ----- Original Message -----
> > From: "Peter Dietz" <dietz@ipsi.fhg.de>
> > To: <users@cocoon.apache.org>
> > Sent: Wednesday, October 29, 2003 1:00 PM
> > Subject: RE: shopping cart : creating a new context
> >
> >
> > > Hi,
> > >
> > > I also had problems creating and accessing session contexts. I solved
> > > them using the "session logicsheet". You can find the doc here
> > > http://cocoon.apache.org/2.1/userdocs/xsp/session.html
> > >
> > > Have fun,
> > > Peter
> > >
> > > -----Original Message-----
> > > From: julien bloit [mailto:Julien.Bloit@ircam.fr]
> > > Sent: Mittwoch, 29. Oktober 2003 11:59
> > > To: users@cocoon.apache.org
> > > Subject: Re: shopping cart : creating a new context
> > >
> > > Alright, I'll try it.
> > > What do you mean by "experimental"? It's not wise to implement it in a
> > > production project for the moment ?
> > >
> > > ----- Original Message -----
> > > From: "leo leonid" <tek@leonid.de>
> > > To: <users@cocoon.apache.org>
> > > Sent: Tuesday, October 28, 2003 10:22 PM
> > > Subject: Re: shopping cart : creating a new context
> > >
> > >
> > >
> > > On Oct 28, 2003, at 4:52 PM, julien bloit wrote:
> > >
> > > > Hi all,
> > > >
> > > > I want to implement a rather classical type of webapp where the user
> > > > browses a catalog, adds items to its shopping cart, and logs in or
> > > > registers when he's ready to buy the items from his cart.
> > > >
> > > > I browsed through the mailing list archive and it seems I could
> > > > proceed using the session transformer.
> > > >
> > > > Here's a snippet of my sitemap :
> > > >
> > > >
> > >
> > > <snippet />
> > >
> > >
> > > >
> > > > Aside from knowing where the error might come from, I'd like to know
> > > > if this seems a correct way to proceed to store user data while he's
> > > > not logged yet.
> > > >
> > >
> > > If you want to see another (experimental) approach, look at the
> > > PetStore Sample. It uses flow script to achieve this functionality. At
> > > the moment I'm implementing the missing parts of the sample, using
> > > woody as form framework. Expect a patch in the next days.
> > >
> > > /leo
> > >
> > >
> > >
> > > > many many thanks for your thoughts!
> > > > Cheers,
> > > > Julien
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message