Re: Question sur le block spring-app
Laurent Perez wrote: Hello Je cherche à pouvoir toucher Cocoon à partir de ma couche de composants Spring : quelque chose de très basique, c'est à dire pouvoir récupérer la sortie XML d'un map:match pattern=xx. Tous mes composants Spring sont déclarés dans mon applicationContext.xml, qui est chargé par le web.xml de la webapp Cocoon. Le block spring-app dans le trunk (1) ressemble à ce que je cherche à faire : org.apache.cocoon.core.Core apparait comme un bean cocoon-core dans l'applicationContext.xml. Je suppose qu'à partir du moment où je peux toucher au Core, il doit bien y avoir un moyen de toucher une sitemap ensuite (?). Seulement spring-app n'est pas du tout documenté, et je ne sais pas s'il est plutôt fait pour toucher Spring à partir de Cocoon, ou l'inverse. Ensuite je me demande si exposer directement le Core n'est pas overkill pour ce que je cherche à faire. Quelqu'un pourrait-il m'éclairer sur ce point ? Le block spring-app tire parti de la réarchitecture de la gestion des composants qui a été faite dans la future version 2.2. L'idée de initiale part du constat que Avalon, à la base de Cocoon, n'est plus le seul conteneur léger sur le marché et qu'il est nécéssaire d'intégrer les conteneurs plus modernes comme Spring, Hivemind ou Pico. Dans la version 2.1, il est facile d'intégrer ces conteneurs à l'intérieur de Cocoon, mais en gardant une barrière relativement étanche entre les différents mondes. Voir le bricks-cms de Bertrand [1] ou la présentation de Ugo Cei à la GetTogether 2004 [2]. Dans la version 2.2, il y a un pont entre des conteneurs divers hébergés par Cocoon. Concrètement, cela signifie qu'un composant géré par Avalon pourra voir un composant Spring comme s'il était géré par Avalon, et réciproquement. Pour revenir à ton problème, il devrait suffire que tu puisses accéder au SourceResolver pour appeler un pipeline avec cocoon://xxx, et il faut donc l'injecter dans l'ApplicationContext Spring. Je suppose que tu utilises le ServletContextListener déclaré dans web.xml, ce qui malheureusement va instancier tous les beans avant que Cocoon aie créé ses composants, dont le SourceResolver. Une solution est de déclarer dans le contexte Spring une implémentation fantôme de SourceResolver, prête à déléguer au vrai resolver lorsqu'il sera disponible, et qui sera utilisée par les autres beans. Dans la partie Cocoon de l'appli, soit via un petit composant ThreadSafe, soit juste avant d'appeler les beans Spring, tu donnes le vrai resolver au fantôme, ce qui permet aux beans d'accéder aux pipelines Cocoon. C'est du design en direct et je ne l'ai pas testé, mais ça devrait faire l'affaire ! Sylvain [1] http://svn.apache.org/repos/asf/cocoon/whiteboard/example-apps/bricks-cms/ [2] http://www.apache.org/dist/cocoon/events/gt2004/presentations/ -- Sylvain WallezAnyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research Technology Director - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: Templates et Transformer
Joel Gauci wrote: Bonjour, Toujours sur le sujet de la compilation des XSL, quelqu'un sait il si un objet Templates (mode compilé) prend plus ou moins de place mémoire qu'un objet Transformer (mode non compilé) pour une même XSL ? Le Templates est un objet qui représente la version analysée d'une XSL, que ce soit sous la forme d'une classe Java avec XSLTC ou un arbre d'évaluation avec les autres moteurs. Cet objet est réentrant et sert à créer des Transformer, qui représentent le contexte d'exécution d'une transformation particulière. Quand on crée un Transformer en direct, sans passer par Templates, le moteur doit de toutes façons analyser la XSL et donc créer un Templates en interne, même s'il n'est pas accessible par l'API. Il ne doit donc pas y avoir de grande différente au niveau consommation mémoire. Par contre, ne pas utiliser l'objet Templates si une même XSL doit être utilisée plusieurs fois est extrèmement pénalisant au niveau des performances, puisque le moteur XSL doit réanalyser le source à chaque transformation. C'est pour cette raison que Cocoon conserve les objets Templates en cache, de façon à ne pas répéter ce travail d'analyse à chaque transformation. Sylvain -- Sylvain WallezAnyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research Technology Director - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Installation de Cocoon 2.1.7 sous JBoss 4.0.3 (Tomcat 5.5)
Bonjour, Je suis en train d'essayer d'installer Cocoon sur serveur qui tourne sous une installation de JBoss 4.0.3 avec dessous Tomcat 5.5. J'ai bien deployé Cocoon 2.1.7 sur ce serveur (en utilisant le war buildé) et le deploiment à l'air de bien se derouler. Ensuite je deploie une application Cocoon (faites de xsp et de xsl). Et lorsque je tape l'url correspondante à une des xsp, le serveur m'affiche le contenu du fichier et ne l'éxécute pas. (ces fichiers xsp fonctionnaient correctement sous le standalone de Cocoon) Ce que je voudrais c'est que lorsque le serveur rencontre une page xsp ou un application de type Cocoon il le traite en tant que tel. Donc je pense que il doit faloir configurer le serveur Tomcat comme il faut mais j'avoue être perdu et je ne sais comment faire. Pourriez-vous m'aider ? Xavier LECHNER Capgemini Bordeaux [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Re: Installation de Cocoon 2.1.7 sous JBoss 4.0.3 (Tomcat 5.5)
Bien, donc si j'ai bien compris je peux, dans le web.xml de JBoss/Tomcat, ajouter la gestion Cocoon ? ou alors dois-je dans le web.xml de Cocoon rajouter la gestion de J2EE ? Si je peux faire l'un ou l'autre, comment dois-je faire ? j'avoue etre un newbie sur ce sujet :-) Xavier - Original Message - From: Sylvain Wallez [EMAIL PROTECTED] To: users-fr@cocoon.apache.org Sent: Friday, October 21, 2005 2:50 PM Subject: Re: Installation de Cocoon 2.1.7 sous JBoss 4.0.3 (Tomcat 5.5) Xavier LECHNER wrote: Ah bien, merci, deja ca me fait un élément de reponse... Alors une autre question me viens à l'esprit : Est ce que les EJB ou tout autre composant JE22 fonctionneront quand meme si l'application est déployer dans la Webapp de Cocoon ? Il ne faut pas oublier que Cocoon n'est que un servlet :-) Faire cohabiter Cocoon avec d'autres servlets dans le même web.xml est sans soucis (j'ai eu l'occasion de brancher Cocoon pour faire des vues PDF et Excel dans une appli Struts/JSP) et étendre ça à tout le stack J2EE ne devrait pas poser plus de problèmes. Sylvain -- Sylvain WallezAnyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research Technology Director - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: Installation de Cocoon 2.1.7 sous JBoss 4.0.3 (Tomcat 5.5)
Les ejb marchent très bien avec cocoon, mais par contre il faut faire le plombier pour les atteindre. Pour ça ya deux endroits où toucher les ejb, dans les actions, et les générateurs. Perso dans différents projets j'avais écrit une façade qui me facilitait tout ça, mais avec les cforms il faut repenser en termes de mapping ejb/cform. Probablement avec les bindings. Ah, et probablement aussi utiliser spring pour éviter d'avoir à écrire toute la pénible gestion d'exceptions et de récupération depuis jndi. bonne chance manu On Fri, Oct 21, 2005 at 02:57:21PM +0200, Xavier LECHNER wrote: Bien, donc si j'ai bien compris je peux, dans le web.xml de JBoss/Tomcat, ajouter la gestion Cocoon ? ou alors dois-je dans le web.xml de Cocoon rajouter la gestion de J2EE ? Si je peux faire l'un ou l'autre, comment dois-je faire ? j'avoue etre un newbie sur ce sujet :-) Xavier - Original Message - From: Sylvain Wallez [EMAIL PROTECTED] To: users-fr@cocoon.apache.org Sent: Friday, October 21, 2005 2:50 PM Subject: Re: Installation de Cocoon 2.1.7 sous JBoss 4.0.3 (Tomcat 5.5) Xavier LECHNER wrote: Ah bien, merci, deja ca me fait un élément de reponse... Alors une autre question me viens à l'esprit : Est ce que les EJB ou tout autre composant JE22 fonctionneront quand meme si l'application est déployer dans la Webapp de Cocoon ? Il ne faut pas oublier que Cocoon n'est que un servlet :-) Faire cohabiter Cocoon avec d'autres servlets dans le même web.xml est sans soucis (j'ai eu l'occasion de brancher Cocoon pour faire des vues PDF et Excel dans une appli Struts/JSP) et étendre ça à tout le stack J2EE ne devrait pas poser plus de problèmes. Sylvain -- Sylvain WallezAnyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research Technology Director - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED] - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Recuperation de plusieurs fichiers XMLs pour mettre dans un seul XML
Bonjour, Je suis entrain de recuperer plusieur information en format xml pour mettre dans un seul fichier xml, pour cela, j'utilise Cinclude. -- Voici mon sitemap !-- la liste complet etudiant -- map:pipeline type=caching map:parameter name=expires value=access plus 1 hours/ map:match pattern=Source/*/Status/*/Complet_Etudiant/Pole/*/Liste.xml map:generate src=cocoon:/Source/{1}/Etudiant/Pole/{3}/Liste.xml/ map:transform src=filtre/xml-complet_etudiant.xsl map:parameter name=URLLotus value={1}/ map:parameter name=status value={2}/ map:parameter name=pole value={3}/ /map:transform map:transform type=cinclude/ map:serialize type=xml/ /map:match /map:pipeline !-- information d'un seul etudiant -- map:pipeline type=caching map:parameter name=expires value=access plus 1 hours/ map:match pattern=Source/*/Etudiant/Pole/*/*.xml map:generate src=http://{1}/ThES_{2}.nsf/viewXML_et/{3}/ map:serialize type=xml/ /map:match /map:pipeline voici la feuille de style : ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:ci=http://apache.org/cocoon/include/1.0; xsl:param name=URLLotus / xsl:param name=pole / xsl:param name=status / xsl:template match=/ liste_Et xsl:if test=not($status='*') xsl:apply-templates select=/liste_Et/et[identite/status=$status] / /xsl:if xsl:if test=$status='*' xsl:apply-templates select=/liste_Et/et / /xsl:if /liste_Et /xsl:template xsl:template match=et xsl:variable name=idEt select=@id / ci:include src={concat('cocoon://ThES_test/Source/Source/',$URLLotus,'/Etudiant/Pole/',$pole,'/',$idEt,'.xml')} /ci:include /xsl:template /xsl:stylesheet --- Explication: Je recupere la liste complete des etudiants, puis avec le Cinclude, je recupere tout les informations de chaque Etudiant pour mettre dans un seul fichier XML pour faire après d'autre traitement. Le Problème est que j'ai environ 2000 étudiants donc pour recuperer le fichier de sortir il me faut environ 10min à 20min donc ce n'est pas trop terrible. Je recherche trouver la meillieur solution pour optimiser, mais je ne trouve pas de solution :-( Nb: Entre le serveur (Serveur Lotus Notes) que je recupere les données XML et le serveur cocoon, il y a une connexion de 10 Mbits. Le fichier XML de sortie fait environ 2Mo. Emmanuel FRANCISCO - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: Accessing authentication-contex wthout actually protecting a pipeline?
Christofer Dutz schrieb: hello, I am working on some rather simple problem. I want the title Frame of a framed website to display the users name (which is contained inside the additional login-data); if he is logged-in. Unfortunately I don't seem to be able to access the authentication information without actually protecting the pipeline with the auth-protect action. This is not possible (imho). You have to store the Username in the default Session(-context). HTH Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing authentication-contex wthout actually protecting a pipeline?
* Christofer Dutz: I am working on some rather simple problem. I want the title Frame of a framed website to display the users name (which is contained inside the additional login-data); if he is logged-in. Unfortunately I don't seem to be able to access the authentication information without actually protecting the pipeline with the auth-protect action. Why would you like to avoid the map:act type=auth-protect? If that's just for the sake of simplicity and conciseness of your sitemap, you can protect all pipelines at once like below: map:act type=auth-protect map:match pattern=a ... /map:match map:match pattern=b ... /map:match map:match pattern=c ... /map:match /map:act -- Jean-Baptiste Quenot Systèmes d'Information ANYWARE TECHNOLOGIES Tel : +33 (0)5 61 00 52 90 Fax : +33 (0)5 61 00 51 46 http://www.anyware-tech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.1.8 - namespaced xml binding failing.
* Suzan Foster: Correction to my previous post: when the prefixes in the xml file and xpath expressions match it does bind, But when f.i. the xml file binds the namespace to the prefix co: whilst the binding definition binds the namespace to the prefix ab: it fails. That's interesting. But can you provide a sample XML document and your form binding? It may be useful to see how you declared the namespaces. -- Jean-Baptiste Quenot Systèmes d'Information ANYWARE TECHNOLOGIES Tel : +33 (0)5 61 00 52 90 Fax : +33 (0)5 61 00 51 46 http://www.anyware-tech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Accessing authentication-contex wthout actually protecting a pipeline?
What about the scenario of a portal in which you can access a page without login and have special features when you are logged in? That's what's happening in my case. Chris -Ursprüngliche Nachricht- Von: Jean-Baptiste Quenot [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Oktober 2005 08:50 An: users@cocoon.apache.org Betreff: Re: Accessing authentication-contex wthout actually protecting a pipeline? * Christofer Dutz: I am working on some rather simple problem. I want the title Frame of a framed website to display the users name (which is contained inside the additional login-data); if he is logged-in. Unfortunately I don't seem to be able to access the authentication information without actually protecting the pipeline with the auth-protect action. Why would you like to avoid the map:act type=auth-protect? If that's just for the sake of simplicity and conciseness of your sitemap, you can protect all pipelines at once like below: map:act type=auth-protect map:match pattern=a ... /map:match map:match pattern=b ... /map:match map:match pattern=c ... /map:match /map:act -- Jean-Baptiste Quenot Systèmes d'Information ANYWARE TECHNOLOGIES Tel : +33 (0)5 61 00 52 90 Fax : +33 (0)5 61 00 51 46 http://www.anyware-tech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon 2.1.8 - namespaced xml binding failing.
Namespaces gave me major headaches with JX, CFORMS and XMLDb. Seems it would be nice if one could define/overload namespaces on a per-sitemap or per-pipeline basis. Is there a way to do this sort of thing or would this be a bad-practice? A couple of other related questions: i) What is the best way to debug namespace problems? ii) How does one remove the cform view-links from the top right corner? Your wisdom is most-appreciated Cocoon enthusiats. -Original Message- From: Jean-Baptiste Quenot [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 12:51 AM To: users@cocoon.apache.org Subject: Re: Cocoon 2.1.8 - namespaced xml binding failing. * Suzan Foster: Correction to my previous post: when the prefixes in the xml file and xpath expressions match it does bind, But when f.i. the xml file binds the namespace to the prefix co: whilst the binding definition binds the namespace to the prefix ab: it fails. That's interesting. But can you provide a sample XML document and your form binding? It may be useful to see how you declared the namespaces. -- Jean-Baptiste Quenot Systèmes d'Information ANYWARE TECHNOLOGIES Tel : +33 (0)5 61 00 52 90 Fax : +33 (0)5 61 00 51 46 http://www.anyware-tech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.1.8 - namespaced xml binding failing.
I think the names will be self-explanatory, but just to be thourough: * data.xml is the namespaced xml data. * binding.ok.xml is the namespaced binding using the same prefix as in data.xml. * binding.fail.xml is the namespaced binding using a different prefix for the namespace. Jean-Baptiste Quenot wrote: * Suzan Foster: Correction to my previous post: when the prefixes in the xml file and xpath expressions match it does bind, But when f.i. the xml file binds the namespace to the prefix co: whilst the binding definition binds the namespace to the prefix ab: it fails. That's interesting. But can you provide a sample XML document and your form binding? It may be useful to see how you declared the namespaces. -- Met vriendelijke groet, Suzan Foster Software Engineer *NEROC'MEDIAWARE * De Run 1131 5503 LB Veldhoven T +31 (0)40 258 66 66 F +31 (0)40 258 66 77 E [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ?xml version=1.0 encoding=UTF-8? co:object ref=B xmlns:co=http://www.nerocmediaware.nl/NCO/content/1.0; xmlns:xlink=http://www.w3.org/1999/xlink; co:treetext ref=B_2Fraai rokje!/co:treetext co:text ref=B_3⬠23,95/co:text co:select ref=B_4 co:obj xlink:type=simple xlink:href=/content/kleuren/kleuren.xml#ROOD/ /co:select co:boolean ref=B_5true/co:boolean co:list ref=B_6 co:row co:text ref=B_748/co:text co:text ref=B_8/ co:text ref=B_9⬠23,95/co:text /co:row co:row co:text ref=B_750/co:text co:text ref=B_8/ co:text ref=B_9⬠24,95/co:text /co:row /co:list /co:object ?xml version=1.0? fb:context xmlns:ab=http://www.nerocmediaware.nl/NCO/content/1.0; xmlns:fb=http://apache.org/cocoon/forms/1.0#binding; xmlns:fd=http://apache.org/cocoon/forms/1.0#definition; xmlns:xlink=http://www.w3.org/1999/xlink; path=/ab:object fb:value id=KledingstukOmschrijving path=ab:treetext/ fb:value id=KledingstukPrijs path=ab:text/ fb:value id=KledingstukKleur path=ab:select/ab:obj/@xlink:href/ fb:value id=KledingstukBeschikbaar path=ab:boolean/ fb:repeater id=MaatPrijsTabel parent-path=ab:list row-path=ab:row fb:on-bind fb:value id=Maat path=ab:[EMAIL PROTECTED]'B_7']/ fb:value id=PrijsVan path=ab:[EMAIL PROTECTED]'B_8']/ fb:value id=Prijs path=ab:[EMAIL PROTECTED]'B_9']/ /fb:on-bind fb:on-delete-row fb:delete-node/ /fb:on-delete-row fb:on-insert-row fb:insert-node ab:row ab:text ref=B_7/ ab:text ref=B_8/ ab:text ref=B_9/ /ab:row /fb:insert-node /fb:on-insert-row /fb:repeater /fb:context ?xml version=1.0? fb:context xmlns:co=http://www.nerocmediaware.nl/NCO/content/1.0; xmlns:fb=http://apache.org/cocoon/forms/1.0#binding; xmlns:fd=http://apache.org/cocoon/forms/1.0#definition; xmlns:xlink=http://www.w3.org/1999/xlink; path=/co:object fb:value id=KledingstukOmschrijving path=co:treetext/ fb:value id=KledingstukPrijs path=co:text/ fb:value id=KledingstukKleur path=co:select/co:obj/@xlink:href/ fb:value id=KledingstukBeschikbaar path=co:boolean/ fb:repeater id=MaatPrijsTabel parent-path=co:list row-path=co:row fb:on-bind fb:value id=Maat path=co:[EMAIL PROTECTED]'B_7']/ fb:value id=PrijsVan path=co:[EMAIL PROTECTED]'B_8']/ fb:value id=Prijs path=co:[EMAIL PROTECTED]'B_9']/ /fb:on-bind fb:on-delete-row fb:delete-node/ /fb:on-delete-row fb:on-insert-row fb:insert-node co:row co:text ref=B_7/ co:text ref=B_8/ co:text ref=B_9/ /co:row /fb:insert-node /fb:on-insert-row /fb:repeater /fb:context - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing authentication-contex wthout actually protecting a pipeline?
* Christofer Dutz: What about the scenario of a portal in which you can access a page without login and have special features when you are logged in? That's what's happening in my case. For this usecase we use a special account named « anon ». -- Jean-Baptiste Quenot Systèmes d'Information ANYWARE TECHNOLOGIES Tel : +33 (0)5 61 00 52 90 Fax : +33 (0)5 61 00 51 46 http://www.anyware-tech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Accessing authentication-contex wthout actually protecting a pipeline?
And how can you initially set the auth-data to this guest-user? -Ursprüngliche Nachricht- Von: Jean-Baptiste Quenot [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 21. Oktober 2005 09:35 An: users@cocoon.apache.org Betreff: Re: Accessing authentication-contex wthout actually protecting a pipeline? * Christofer Dutz: What about the scenario of a portal in which you can access a page without login and have special features when you are logged in? That's what's happening in my case. For this usecase we use a special account named « anon ». -- Jean-Baptiste Quenot Systèmes d'Information ANYWARE TECHNOLOGIES Tel : +33 (0)5 61 00 52 90 Fax : +33 (0)5 61 00 51 46 http://www.anyware-tech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing authentication-contex wthout actually protecting a pipeline?
On 10/21/05, Christofer Dutz [EMAIL PROTECTED] wrote: And how can you initially set the auth-data to this guest-user? That's very easy, fortunately! Put this in a pipeline: (from the portal block sitemap.xmap) !-- Do an auto login as anonymous -- map:act type=auth-loggedIn map:parameter name=handler value=portal-handler/ map:parameter name=application value=portal/ map:parameter name=negate-result value=true/ map:act type=auth-login map:parameter name=handler value=portal-handler/ map:parameter name=application value=portal/ map:parameter name=parameter_name value=anonymous/ map:parameter name=parameter_password value=anonymous/ /map:act /map:act Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
VelocityGenerator: error when sending string containing ampersand
Hi, I wrote the following, very simple flowscript: function velotest() { cocoon.sendPage(abstract.vm, { test : vmvm } ); } With abstract.vm being an velocity template processed by the Velocity Generator: ?xml version ? data$test/data I receive the following error, due to the occurence of the ampersand-sign in the vmvm string:: An Error Occurred: The reference to entity vm must end with the ';' delimiter. However, if I use a JXTemplate (like shown below) as argument of sendPage, processed by the JX Generator, everthing is fine. ?xml version=1.0? html xmlns:jx=http://apache.org/cocoon/templates/jx/1.0; This works: ${test} /html Why is the behaviour different with the two generators? If I pass the string somethingmore to a velocity template, using Java as programming language, everything works fine. Thanks a lot for your help Regards Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing authentication-contex wthout actually protecting a pipeline?
Yeah, but be careful with that. Know that map:act type=auth-protect wont protect any pipeline for your guest users. As long as auth-protect is concerned, your guest user is an authenticated user just any other user. It took me several hours to discover that :( To protect your pipeline from guest users you have to do additional checks. Regards, Armaz -Original Message- From: Jonas Lundberg [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 11:04 AM To: users@cocoon.apache.org Subject: Re: Accessing authentication-contex wthout actually protecting a pipeline? On 10/21/05, Christofer Dutz [EMAIL PROTECTED] wrote: And how can you initially set the auth-data to this guest-user? That's very easy, fortunately! Put this in a pipeline: (from the portal block sitemap.xmap) !-- Do an auto login as anonymous -- map:act type=auth-loggedIn map:parameter name=handler value=portal-handler/ map:parameter name=application value=portal/ map:parameter name=negate-result value=true/ map:act type=auth-login map:parameter name=handler value=portal-handler/ map:parameter name=application value=portal/ map:parameter name=parameter_name value=anonymous/ map:parameter name=parameter_password value=anonymous/ /map:act /map:act Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
the shapeCMS Blog / Forum / Web site script package for Cocoon / eXist
ShapeCMS is an experimental blog / forum / web site script package that uses Cocoon with eXist as the XML database. It also integrates some popular javascript libraries for drag-and drop operations and content editing. A description is available at http://shapecms.sourceforge.net/ You can get the package from http://sourceforge.net/projects/shapecms My scripts use the Apache 2.0 license, but the javascript libraries use other licenses. Best regards (and apologies for the cross-posting) Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ESQL question
how about using this syntax ? esql:get-string xsp:attribute xsp:param name=namecolumn/xsp:param xsp:param name=urihttp://apache.org/cocoon/SQL/v2/xsp:param xsp:param name=prefix/ xsp:expr/xsp:expr /xsp:attribute /esql:get-string there _must_ be a way ! Eric -Message d'origine- De : Anna Bikkina [mailto:[EMAIL PROTECTED] Envoyé : 20 octobre, 2005 11:53 À : Markus Vaterlaus Cc : Cocoon users group Objet : Re: ESQL question I tried doing xsp:expr but that didnt work. Is there any way I can do with xsp:logic. Thanks, Anna. On Thu, 2005-10-20 at 11:27, Markus Vaterlaus wrote: Hi Anna can't you do it with a bit of xsp:logic/? Markus On 10/20/05, Anna Bikkina [EMAIL PROTECTED] wrote: Hi, I am trying to get data from the database. My sqlstatement and the order of columns retreived are dynamically built so when I am getting esql:get-string column=XXX I want to make dynamic like esql:get-string column=xsp:exprcolumnname/xsp:expr/ Is there a way we can do it? Thanks in advance Anna. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [CForms] Accessing date-type widget and formating it's output for usage as attribute-value
If I use exactly the same code as you I get [Lorg.w3c.dom.Node;@28e230 as value of ${dateFormatted} ... couldn't find a way around this problem since all child elements, name, value attributes seem to be empty/not excistent. -Ursprüngliche Nachricht- Von: Mark Lundquist [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 20. Oktober 2005 22:14 An: users@cocoon.apache.org Betreff: Re: [CForms] Accessing date-type widget and formating it's output for usage as attribute-value On Oct 20, 2005, at 1:54 PM, Christofer Dutz wrote: Hi, Another problem I am having some problems with. I need to add the value of a date-type widget inside an attribute. Since the simple toString() output doesnt do the trick, I would like to format the output. How can this be done. Chris jx:set var=dateFormattedjx:formatDate pattern=MMM dd, value=${somDate}//jx:set foo bar=${dateFormatted}/ HTH, ml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.1.8 - namespaced xml binding failing.
After looking at the JXPath code I have to come to the conclusion that it doesn't try to normalize the prefixes. I tested this theory by using xmlns:co=http://www.nerocmediaware.nl/NCO/content/1.0; in my data and xmlns:co=http://www.nerocmediaware.nl/NCO/structure/1.0; in my binding. This was able to bind without complaining. Suzan Foster wrote: Correction to my previous post: when the prefixes in the xml file and xpath expressions match it does bind, But when f.i. the xml file binds the namespace to the prefix co: whilst the binding definition binds the namespace to the prefix ab: it fails. -- Met vriendelijke groet, Suzan Foster Software Engineer *NEROC'MEDIAWARE * De Run 1131 5503 LB Veldhoven T +31 (0)40 258 66 66 F +31 (0)40 258 66 77 E [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: [CForms] Accessing date-type widget and formating it's output for usage as attribute-value
On Oct 21, 2005, at 6:53 AM, Christofer Dutz wrote: If I use exactly the same code as you I get [Lorg.w3c.dom.Node;@28e230 as value of ${dateFormatted} ahh right, OK. I guess it would do that. Well then, the next thing that comes to mind would be to do the formatting in the flowscript, using SimpleDateFormat (or, I like to use org.apache.commons.text.FastDateFormat) and passing the result in as its own parameter. That's relatively convenient as long as you are not inside a repeater. If you are, then you might try passing an instance of SimpleDateFormat as a JXTG parameter and then calling it in the template foo bar=${dateFormat.format (someDateInARepeaterWidget)} GL, —ml— - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Accessing repeaterLoop variable from Cocoon Forms
I am trying to use repeaters in my application. I have a More and Less button to add and remove rows, and a hidden boolean widget to indicate the last row. For this purpose, I am trying to set the value using repeaterLoop.last. Trouble is, that value was never set to anything. So then I simplified my form to hold this: ft:repeater-size id=searchDropDowns / ft:repeater-widget id=searchDropDowns Row: b${repeaterLoop.index}/b /ft:repeater-widget Early in the pipeline it looks like this: fi:repeater-size id=searchDropDowns size=1/ Row: b${repeaterLoop.index}/b After it goes through the JX Transform, it looks like this: Row: b/b So it looks like I am not getting access the the repeaterLoop object at all. Any ideas what I am doing wrong or how to fix the problem? Thanks for any help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: esql:get-string dynamic column name
Anna Bikkina wrote: Hi, I am trying to get data from the database. My sqlstatement and the order of columns are dynamically built so when I am getting esql:get-string column=XXX I want to make dynamic like esql:get-string column=xsp:exprcolumnname/xsp:expr/ try: esql:get-stringxsp:attribute name=columnxsp:exprColumn Name/xsp:expr/xsp:attribute/esql:get-string Cheers. Carlos Chávez. Is there a way we can do it? Thanks in advance Anna. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need help in portal . How can i do this ?
Hi. My name is Hugo Marcelino and i need some help on doing something in the portal. I'm using the portal with cocoon forms and when people are using the forms i need to change the coplet title. I was able to set the title , but somehow it is not syncronize in the first time, ie, it does change the title , but it only works when i refresh. This is happening because the continuations (cinclude content coplet) are only processed after the layout has been generated. Does anyone have an ideia off how can i change the title ??? Thank you in advance. 21-10-2005 Hugo Marcelino
Re: Avoid Trimming of empty space / TAB in cocoon widget
[EMAIL PROTECTED] wrote: Hi, I am using Cocoon version 2.1.7. XHTML. During the onchange widget event, the empty / tab space value stored in the textarea widget lost (Cocoon trimming the empty space and tab space value). I know this is an ugly hack, but works, ;-) In the definition file, at the end of the same fd:on-value-changed, get the value of the textarea. If the value is null, then add an space again. Something like: fd:on-value-changed fd:javascript /* Here is your processing logic. */ ... // Hack for XHTML var myTextAreaWidget = event.source.lookupWidget(../myTextArea); if (myTextAreaWidget.getValue() == null) { myTextAreaWidget.setValue( ); } /fd:javascript /fd:on-value-changed Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need help in portal . How can i do this ?
Hi Hugo, You are right that coplet tiles are processed before the coplet that modifies the content. Therefore, at the time coplet modified title, the old one has already been generated for the current request. I think that the right way will be to create a custom portal event, then to do all the work out publisher/subscriber components, etc.. Theoretically, it should be possible to create an action that changes title of a given coplet. It need to be invoked before portal match is executed in the main portal sitemap. Additionally, it is possible to hack it with using JavaScript, where the entire page is refreshed automatically for the portal right after the coplet title was changed (but before it shows up due to refresh delay). Thanks. Sincerely, Nick Goupinets. Hugo Marcelino wrote: Hi. My name is Hugo Marcelino and i need some help on doing something in the portal. I'm using the portal with cocoon forms and when people are using the forms i need to change the coplet title. I was able to set the title , but somehow it is not syncronize in the first time, ie, it does change the title , but it only works when i refresh. This is happening because the continuations (cinclude content coplet) are only processed after the layout has been generated. Does anyone have an ideia off how can i change the title ??? Thank you in advance. 21-10-2005 Hugo Marcelino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]