Re: Jx Macros/ Taglib
On 12/9/05, John S.Washington [EMAIL PROTECTED] wrote: Bon j'ai maintenant une question purement sur les jx-macros et JSTL Je voulais dire JXPath ou Jexl ;-) Si j'ai un document XML du genre : Doc A myTag/ /A B myTag/ /B /Doc Avec ma macro : jx:macro name=myTag ... /jx:macro En fait je voudrais que le traitement différe selon le contexte dans lequel se trouve mon tag. Par exemple je voudrais que le résultat ne soit pas le même selon si le parent de mon tag myTag est A ou B. Est ce qu'il existe un moyen simple de récupérer cette information dans ma macro? J'ai l'impression que ce que je veux faire n'est pas possible avec les macros. Par contre j'ai découvert le tag transformer. Je n'ai pas vu de documentation dessus mais j'ai l'impression qu'on peut faire des macros exactement comme avec des JX-templates. Par contre pour créer des tags plus complexes comme ceux je voudrais on peut utiliser java avec une API standard de taglib. Donc je me demande si je ne devrais pas utiliser ça plutôt. Mais comme je n'ai pas vu beaucoup d'informations sur ce transformer je voudrais aussi savoir si ce n'est pas un projet qui a été abandonné. Merci
Re: indexer avec cocoon
Bonjour, thomas desvenain wrote: bonjour, ceci est certainement une question de débutant... je ne parviens pas à indexer mes documents avec lucene sous cocoon. j'ai cherché dans la doc, les samples et les xmaps... j'avoue ne pas comprendre précisément comment cela fonctionne, et notamment pourquoi l'indexation ne fonctionne pas sur mes documents, par l'interface proposée dans les samples quelqu'un peut-il m'aider ? J'avais fait une petite doc sur le sujet (fortement inspirée de la doc en anglais, d'ailleurs), si ça peut aider : http://esup-portail.org/consortium/espace/indexation/htmlgen/exploitation.html Cordialement, Francois - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: indexer avec cocoon
c'est très clair ! :) bravo ! Le 13/12/05, Francois Jannin[EMAIL PROTECTED] a écrit : Bonjour, thomas desvenain wrote: bonjour, ceci est certainement une question de débutant... je ne parviens pas à indexer mes documents avec lucene sous cocoon. j'ai cherché dans la doc, les samples et les xmaps... j'avoue ne pas comprendre précisément comment cela fonctionne, et notamment pourquoi l'indexation ne fonctionne pas sur mes documents, par l'interface proposée dans les samples quelqu'un peut-il m'aider ? J'avais fait une petite doc sur le sujet (fortement inspirée de la doc en anglais, d'ailleurs), si ça peut aider : http://esup-portail.org/consortium/espace/indexation/htmlgen/exploitation.html Cordialement, Francois - 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]
Basique question de session et url rewrite
Bonjour, J'utilise des prefixes (foo1.domain.com, foo2.doamin.com ...) mais il s'agit de la meme appli cocoon dans le meme container/context. Il ne s'agit donc pas de virtual hosting. J'tilise seulement le mod_rewrite de httpd pour passer le prefixe a droite, je voudarais donc y voir la meme session, or le hostname du cookie de session est different. Ma question est simplment par quel moyen garder la session !!?? Phil - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
RE: encodage utf8
Bonjour Aurélien, Je suis un peu dépassé ... Qu'est ce que tu entends par 3) Lancement du container avec LANG=fr_FR.UTF-8 ? Pour le 1) j'ai supposé qu'il s'agissait du paramètre form-encoding de WEB-INF/web.xml. C'est bien ça ? Pour le 2) j'ai changé la déclaration du serializer html dans mon sitemap : map:serializer name=html src=org.apache.cocoon.serialization.HTMLSerializer mime-type=text/html logger=sitemap.serializer.html encodingUTF-8/encoding /map:serializer C'est bien ça ? Merci ! Philippe -Message d'origine- De : Aurélien DEHAY [mailto:[EMAIL PROTECTED] Envoyé : vendredi 2 décembre 2005 22:15 À : users-fr@cocoon.apache.org Objet : Re: encodage utf8 Bonjour. Je me souviens avoir eu le même problème, et voici les étapes qui ont fonctionné pour moi: 1) Configuration de form-encoding en utf-8 dans le container 2) Fixer l'encoding envoyé au client à utf-8 (rajout du mime-type=text/html; charset=utf-8) dans le serializer. 3) Lancement du container avec LANG=fr_FR.UTF-8 4) Création de la base avec l'encoding utf-8 (pour postgres en tout cas, je ne sais pas si cela est obligatoire). Cela avait fonctionné pour moi, j'espère que cela vous aidera. Cordialement. -- Aurélien - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED] --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: Question sitemap mount / httpd.conf
Jean-Baptiste Quenot wrote: map:match pattern=help/** map:mount check-reload=yes src=help/ uri-prefix=help/ /map:match Juste une petite remarque au passage: check-reload est vrai par défaut, et il est donc inutile de le spécifier. Ca améliore la lisibilité économise de la fatigue pour les doigts :-) Sylvain -- Sylvain WallezAnyware Technologies http://bluxte.net 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: encodage utf8
Je n'arrive pas à empêcher le serializer html de transformer mes é en acute; Le serializer xml, lui, retourne des é codés en utf-8 (\C3\A9) Dans le header du résultat de mes requêtes, j'ai bien charset=utf-8 dans le content-type. Qu'est ce qu'il faut que je fasse en plus ? J'ai mis form-encodingutf-8/form-encoding dans WEB-INF/web.xml. J'ai cette déclaration pour le serializer html : map:serializer name=html src=org.apache.cocoon.serialization.HTMLSerializer mime-type=text/html; charset=utf-8 logger=sitemap.serializer.html encodingutf-8/encoding /map:serializer J'ai cette déclaration pour le sérializer xml : map:serializer name=xml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/xml; charset=utf-8 pool-max=32 pool-min=16 pool-grow=4 logger=sitemap.serializer.xml encodingutf-8/encoding /map:serializer Philippe -Message d'origine- De : Aurélien DEHAY [mailto:[EMAIL PROTECTED] Envoyé : vendredi 2 décembre 2005 22:15 À : users-fr@cocoon.apache.org Objet : Re: encodage utf8 Bonjour. Je me souviens avoir eu le même problème, et voici les étapes qui ont fonctionné pour moi: 1) Configuration de form-encoding en utf-8 dans le container 2) Fixer l'encoding envoyé au client à utf-8 (rajout du mime-type=text/html; charset=utf-8) dans le serializer. 3) Lancement du container avec LANG=fr_FR.UTF-8 4) Création de la base avec l'encoding utf-8 (pour postgres en tout cas, je ne sais pas si cela est obligatoire). Cela avait fonctionné pour moi, j'espère que cela vous aidera. Cordialement. -- Aurélien - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED] --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: Basique question de session et url rewrite
En fait ma question se resume a comment controler le hostname du cookie de session. Je ne vois aucune solution du cote tomcat ou httpd. Phil philguillard wrote: Bonjour, J'utilise des prefixes (foo1.domain.com, foo2.doamin.com ...) mais il s'agit de la meme appli cocoon dans le meme container/context. Il ne s'agit donc pas de virtual hosting. J'tilise seulement le mod_rewrite de httpd pour passer le prefixe a droite, je voudarais donc y voir la meme session, or le hostname du cookie de session est different. Ma question est simplment par quel moyen garder la session !!?? Phil - 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]
RE: Using the directory generator
On 12.12.2005 17:22, [EMAIL PROTECTED] wrote: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:sql=http://apache.org/cocoon/SQL/2.0; xmlns:dir=http://apache.org/cocoon/directory/2.0.; Don't know if it is only a typo in the mail, but the namespace declaration for the dir prefix ends with a dot, which it should not. How sharp, respect! Jörg - 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: Re: xspAttr cannot be resolved in Cocoon 2.1.8
Hi all, Patch in CVS/SVN, found on cocoon-dev list: http://marc.theaimsgroup.com/?l=xml-cocoon-devm=113273736320287w=2 HIH On Wed, 2005-12-07 at 19:35 +0100, Markus Vaterlaus wrote: Hello there I get the same error: org.apache.cocoon.components.language.LanguageException: Error compiling id_ranges_xsp: ERROR 1 (org/apache/cocoon/www/id_ranges/xsp/id_ranges_xsp.java): ... ); _xspAttr.clear(); http://www.orcades.net Orcades-lr Création de site - Référencement - Conseil 4ter Bd Montpellier Bat B 34000 MONTPELLIER FRANCE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CForms - different views of the same widget
Cocoon Version 2.1.5 (but I could upgrade to 2.1.8 as this is for a new project). [EMAIL PROTECTED] 2005/11/11 11:55 PM Derek Hohls wrote: Christoph If you look back at this thread, the idea is to have this in the form definition file i.e. fd:on-value-changed fd:javascript var thisWidget = event.source; if ( thisWidget.getValue() == ) { thisWidget.setState ( ACTIVE ) } else { thisWidget.setState ( OUTPUT ) } /fd:javascript /fd:on-value-changed I do not think the form.lookupWidget approach works here... is there something else you can suggest? When I try thisWidget.setState ( Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE ) Then I get an unknown setState() function error. What version of Cocoon are you using? Sylvain -- Sylvain WallezAnyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research Technology Director - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Textarea field problem with cforms/flow
I have data from a database that I display in a CForm and allow a user to update. The text is displayed in the textarea of a form; when there is a long string, the text simply wraps and all is fine. However, each time a CR is entered from the keyboard then, after the data gets saved to the database, an extra CR (#13;) gets added to each existing CR as well, resulting in more and more blank lines being inserted. How do I prevent this happening? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Bricks - Where do library files go?
Bertrand Delacretaz wrote: ...Also what if the release of Cocoon I'm using has an old version of a jar file and my project absolutely requires the latest version. Should anything I put into the project lib directory override the Cocoon release version?... As is, it doesn't, I think you'll get a mix of versions if you do this. If you want to replace Cocoon jars I think you'll have to maintain lists of files to remove, or bug us to upgrade the jars in the distribution. Thanks for the help. Mmm... I think I'll have to do something along those lines. I also found myself enabling some Cocoon blocks I didn't actually need just so the core library I did want was in the classpath (Lucene for example). The more I think about it the more I realize how difficult this is. You can't simply say use this jar file in preference to any other because the other jar files may be named differently yet contain the same classes. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running a shell script from Cocoon
On Mon, 2005-12-12 at 11:37, Jorg Heymans wrote: Peter Flynn wrote: On Sun, 2005-12-11 at 11:03, Jorg Heymans wrote: i'm sure you could use Runtime.exec() just about anyware you like to call your shellscript. If you need the output of the shell script then i'ld put this call in a generator for example. Could you give an example of the syntax for doing this? (untested, and evilness of runtime.exec ignored ) Process p = Runtime.getRuntime().exec(cat myfile.xml); SAXParserFactory factory = SAXParserFactory.newInstance(); factory.newSAXParser().parse(p.getInputStream(), contenthandler); Sorry, what I meant was how do I get my sitemap.xmap to call this? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to configure the location of external services in the sitemap
Hello, At work we are working on a Cocoon application that uses http requests in generators. The base URLs in these requests differ for each instance of our application. We don't want people to edit the sitemap to change URLs of these external services, everytime the sitemap changes. During development we also want to keep our local configuration. Furthermore we generate links to external services and these links also differ for each instance of the application. A simple approach is to generate a sitemap.xmap file using a template file for the sitemap and an XML document containing a list of external services. A simple XSLT script can transform the template sitemap file into a sitemap file. This requires regenerating the sitemap file after changing either the sitemap template or the file with base-URLs. For generating links, the XML document with base URLs can be used in the XSL script that generates HTML. Maybe there are better ways to solve this problem. If anyone has a good solution and scripts available, please let me know. Fred -- |E R | D F | |fred at fredvos dot org |5235 DG 52 NL +31 73 6411833 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Increasing Cocoon Portal speed at stat-up
Hi. My site is a two user site; anonymous or logged user can't i create a cachedLayout for both of them (for example for the user with userName anonymous and password anonymous and another with username root password root) so that i can load only one time the layout and use always them without to call getDefaultLayout at every new request? If i can do this... can you suggest how i can operate this change? Thanks. -- Initial Header --- From : Ralph Goers [EMAIL PROTECTED] To : users@cocoon.apache.org Cc : Date : Tue, 25 Oct 2005 07:23:36 -0700 Subject : Re: Increasing Cocoon Portal speed at stat-up Angelo Immediata wrote: Hi. My site is a service oriented portal; i have several application developed by using cocoon and integrated under the cocoon-portal block. Every application is a page (a named-item in the portal-user-anonymous.xml). Moreover i have a double navigator. I attach to this mail all my profiles directory in order you can see the structure (it's a .rar file, you need winrar in order to decompress it). My question, now, is... why to convert layout into object and not to use SAX in order to read the xml files?. I haven't looked at your files yet, but to answer the question - The portal needs to access the layout on each and every request. I'm pretty sure that parsing the files every time would be even worse than what you are experiencing. I'm not too familar with the internals of Castor, but I'd bet that it uses SAX to read the xml files. Ralph - 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: Textarea field problem with cforms/flow
Experienced the same stupid behavior of textarea in combination with CFORMS. Quick and dirty solution: textarea id=interesses xsl:copy-of select=translate(xpath2yourfield-text, '#13;', '')/ /textarea If you don't want to spend much time on it, this solution works, if you do want to spend time, plz let me know if you find a decent solution AS I have data from a database that I display in a CForm and allow a user to update. The text is displayed in the textarea of a form; when there is a long string, the text simply wraps and all is fine. However, each time a CR is entered from the keyboard then, after the data gets saved to the database, an extra CR (#13;) gets added to each existing CR as well, resulting in more and more blank lines being inserted. How do I prevent this happening? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - 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 shutdown listener?
Should look at jakarta-tomcat component for LifeCycleListener. As my connection towards http://tomcat.apache.org is temporaly down I cannot be more précis | sharp ;} On Wed, 2005-12-07 at 10:20 +, Antony Grinyer wrote: Hi, Is there anything in cocoon that can be used to invoke a Java class (maybe via an act?) at shutdown i.e. such as a shutdown listener? We have a webapp application which must clean up the application (e.g. close open objects) if cocoon is shut down unexpectedly. Thanks, Ant CSW Group Ltd. --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.orcades.net Orcades-lr Création de site - Référencement - Conseil 4ter Bd Montpellier Bat B 34000 MONTPELLIER FRANCE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Textarea field problem with cforms/flow
AS Thanks for this... but I am not sure what to do with it? Do you suggest I have an extra XSLT post-processing the form? If so, how and where would I configure it? If not, what else should I be doing? Thanks! Derek [EMAIL PROTECTED] 2005/12/13 03:12 PM Experienced the same stupid behavior of textarea in combination with CFORMS. Quick and dirty solution: textarea id=interesses xsl:copy-of select=translate(xpath2yourfield-text, '#13;', '')/ /textarea If you don't want to spend much time on it, this solution works, if you do want to spend time, plz let me know if you find a decent solution AS I have data from a database that I display in a CForm and allow a user to update. The text is displayed in the textarea of a form; when there is a long string, the text simply wraps and all is fine. However, each time a CR is entered from the keyboard then, after the data gets saved to the database, an extra CR (#13;) gets added to each existing CR as well, resulting in more and more blank lines being inserted. How do I prevent this happening? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] . This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - 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] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War File Not Created During Build
I knew it had to be something simple like that! Thanx Joerg It's better to be hated for who you are than loved for who you are not Ian D. Stewart Appl Dev Analyst-Advisory, DCS Automation JPMorganChase Global Technology Infrastructure Phone: (614) 244-2564 Pager: (888) 260-0078 Joerg Heinicke [EMAIL PROTECTED]To: users@cocoon.apache.org mx.de cc: Subject: Re: War File Not Created During Build 12/12/2005 05:21 PM Please respond to users On 29.11.2005 16:33, [EMAIL PROTECTED] wrote: Is there a target to list valid targets, and a short description of each? A quick perusal of build.xml (and imported build files) didn't turn up anything promising. Ant provides this list by build -projecthelp, but the generated list heavily depends on the documented targets. Jörg - 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]
CForm/Js Problem with 2.1.8
Dear community I have installed cocoon-2.1.8 under tomcat-5.5.9 and I got the following error: java.lang.IllegalArgumentException: Unknown type of result: class javax.xml.transform.dom.DOMResult Cocoon stacktrace[hide] Error calling flowscript function showForm resource://org/apache/cocoon/forms/flow/javascript/Form.js - 47:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/util/js/CformUtil.js - 6:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/sitemap.xmap - 355:32 map:call file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/sitemap.xmap - 896:66 map:mount What can I do? Thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple forms per page
Sounds like you're running into a variance between the IE and Firefox object models. For best performance, I would recommend restricting your javascript to the DOM standard. You can find the object model for MSIE here: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp You can find the object model for Firefox here: http://developer.mozilla.org/en/docs/Gecko_DOM_Reference You can find the JavaScript bindings for the DOM Level 2 Core can be found here: http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html Assuming state is the id of the element and idx is text content to be set for that element, the following should work (untested) for both MSIE and Firefox: var stateElem = document.getElementById(state); var oldContent = stateElem.getFirstChild(); var newContent document.createText(idx); stateElem.replaceChild(newContent, oldContent); HTH, Ian It's better to be hated for who you are than loved for who you are not Ian D. Stewart Appl Dev Analyst-Advisory, DCS Automation JPMorganChase Global Technology Infrastructure Phone: (614) 244-2564 Pager: (888) 260-0078 Alessandro Vincelli To: users@cocoon.apache.org [EMAIL PROTECTED]cc: t Subject: Re: Multiple forms per page 12/13/2005 10:24 AM Please respond to users I have a problem in cocoon 2.1.8 with a tab form... in Explorer no problem in Firefox this error: Error: document.getElementById(state) has no properties Source File: ... /js/forms-lib.js Line: 180 in forms-libs.js function forms_showTab(tabgroup, idx, length, state) { // Change state value if (state.length 0) { document.getElementById(state).value = idx; } Can you help me? thanks in advance, Alessandro --- Alessandro Vincelli W4B - web for business s.r.l. Firenze via Pellicceria 10 - 50123 E-mail: [EMAIL PROTECTED] tel: 055-2654270 Sylvain Wallez ha scritto: werner wrote: Yes, it's true. The tabs don't work when you have another form on the page. This problem can be solved if you change the line in forms-lib.js: document.forms[0][state].value = idx; to document.getElementById(state).value=idx; Then there is another change in the xsl necessary, because the tab-state widget is not generated with an id attribute (only with a name). In forms-page-styling.xsl look for the line input type=hidden name={$state-widget} value={$active}/ and add the id attribute input type=hidden name={$state-widget} id={$state-widget} value={$active}/ Then it works. I don't know it this is a hack or not. As far as I have seen, this problem exists in 2.1.7 and 2.1.8 (without Ajax) It will be in 2.1.8 :-) Thanks for spotting this! Sylvain - 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: Increasing Cocoon Portal speed at stat-up
Hi. My site is a two user site; anonymous or logged user can't i create a cachedLayout for both of them (for example for the user with userName anonymous and password anonymous and another with username root password root) so that i can load only one time the layout and use always them without to call getDefaultLayout at every new request? If i can do this... can you suggest how i can operate this change? Thanks. -- Initial Header --- From : Ralph Goers [EMAIL PROTECTED] To : users@cocoon.apache.org Cc : Date : Tue, 25 Oct 2005 07:23:36 -0700 Subject : Re: Increasing Cocoon Portal speed at stat-up Angelo Immediata wrote: Hi. My site is a service oriented portal; i have several application developed by using cocoon and integrated under the cocoon-portal block. Every application is a page (a named-item in the portal-user-anonymous.xml). Moreover i have a double navigator. I attach to this mail all my profiles directory in order you can see the structure (it's a .rar file, you need winrar in order to decompress it). My question, now, is... why to convert layout into object and not to use SAX in order to read the xml files?. I haven't looked at your files yet, but to answer the question - The portal needs to access the layout on each and every request. I'm pretty sure that parsing the files every time would be even worse than what you are experiencing. I'm not too familar with the internals of Castor, but I'd bet that it uses SAX to read the xml files. Ralph - 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]
Search with Lucene
This is my first encounter with Lucene. I am trying to integrate it with Cocoon. From what I read so far I prefer the approach with LuceneIndexTransformer. Here is where I need some assistance. >From what I understand, the transformer creates the index from .xml files with proper Lucene annotations. I also read that the transformer not only creates the index, but also transforms the file to an xml result format, containing data about the indexed documents. For searching I want to use SearchGenerator. It says that I'm searching the index. Now why do I need the xml result from the LuceneIndexTransformer if I'm searching the index. So you see, I am kind of confused. If someone could please explain the concept (focused on LuceneIndexTransformer - SearchGenerator pair) for me, I would greatly appreciate it. Risking to sound stupid, I want to add that allthe pages from my web application contain dynamic data collected from a DB. I hope they can be indexed. Thank you in advance! Dan
Re: Cocoon Bricks - Where do library files go?
Le 13 déc. 05, à 12:24, David Legg a écrit : ...I also found myself enabling some Cocoon blocks I didn't actually need just so the core library I did want was in the classpath (Lucene for example)... I wouldn't do that - just grab the original jar and copy to your lib subdir, it will make it clearer that you need just that jar. ...The more I think about it the more I realize how difficult this is. You can't simply say use this jar file in preference to any other because the other jar files may be named differently yet contain the same classes... Yes, jar versioning is a pain. Maven builds should help, I'd like to create a mavenized version of bricks-cms but lack the time ATM. -Bertrand smime.p7s Description: S/MIME cryptographic signature
Re: server startup
Hi all, Even if you coding java stuff. Eclipse IDE support hot class reloading. You just have to run tomcat/cocoon inside eclipse, and it's done. The only limitation is linked to hot class reloading, classes will be hot reloaded *ONLY* if theirs interfaces remains unchanged. Hot class reloading will failed if: * a member name change (new, change, delete) * On Tue, 2005-12-06 at 23:58 +, Upayavira wrote: David wrote: I have been trying to find some information on how to speed up the start up of cocoon. I found how to speed up applications in it but not the start up. The only thing I have found that helps is the obvious -- turning off blocks that are not needed. Any one have some tips? The reason I am trying to speed it up is because when I'm developing I constantly have to reload cocoon. The slow start up slows down development. The art is to not restart Cocoon. There are various ways of achieving this. The question though is: what are you doing that requires restarts? Java coding? Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple forms per page
I don't think this is a browser problem. Does your form template contain the state widget? fi:state ft:widget id=tab-state / /fi:state I don't know it the state-widget is really obligatory, but there is at least a _javascript_ error if it does not exist. Werner Am Dienstag, den 13.12.2005, 16:24 +0100 schrieb Alessandro Vincelli: I have a problem in cocoon 2.1.8 with a tab form... in Explorer no problem in Firefox this error: Error: document.getElementById(state) has no properties Source File: ... /js/forms-lib.js Line: 180 in forms-libs.js function forms_showTab(tabgroup, idx, length, state) { // Change state value if (state.length 0) { document.getElementById(state).value = idx; } Can you help me? thanks in advance, Alessandro --- Alessandro Vincelli W4B - web for business s.r.l. Firenze via Pellicceria 10 - 50123 E-mail: [EMAIL PROTECTED] tel: 055-2654270 Sylvain Wallez ha scritto: werner wrote: Yes, it's true. The tabs don't work when you have another form on the page. This problem can be solved if you change the line in forms-lib.js: document.forms[0][state].value = idx; to document.getElementById(state).value=idx; Then there is another change in the xsl necessary, because the tab-state widget is not generated with an id attribute (only with a name). In forms-page-styling.xsl look for the line input type=hidden name={$state-widget} value={$active}/ and add the id attribute input type=hidden name={$state-widget} id={$state-widget} value={$active}/ Then it works. I don't know it this is a hack or not. As far as I have seen, this problem exists in 2.1.7 and 2.1.8 (without Ajax) It will be in 2.1.8 :-) Thanks for spotting this! Sylvain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Fischer Masik OEG GEFi Informationstechnik und Datenservice Reisenbauerring 5/1/12 A-2351 Wiener Neudorf Tel: 02236 / 304 224 Fax: 02236 / 304 278 Mobil: 0676 528 97 57 Internet: http://www.gefi.at e-mail: persnlich: [EMAIL PROTECTED] allgemein: [EMAIL PROTECTED] * Confidentiality Notice * The information contained in this Email, and any attachments, is intended for the named recipients only. It may contain confidential and/or privileged information. If you are not the intended recipient, you must not copy, distribute, or take any action in reliance on it. Any views expressed do not necessarily reflect the views of the company. If you receive this Email by mistake, please advise the sender by using the reply facility in your Email software and then delete it.
Re: CForm/Js Problem with 2.1.8
Make sure you are using the right xml-apis.jar. Best Regards, Antonio Gallardo. Merico Raffaele wrote: Dear community I have installed cocoon-2.1.8 under tomcat-5.5.9 and I got the following error: java.lang.IllegalArgumentException: Unknown type of result: class javax.xml.transform.dom.DOMResult Cocoon stacktrace[hide] Error calling flowscript function showForm resource://org/apache/cocoon/forms/flow/javascript/Form.js - 47:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/util/js/CformUtil.js - 6:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/sitemap.xmap - 355:32 map:call file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/sitemap.xmap - 896:66 map:mount What can I do? Thanks in advance ... Raffaele - 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: server startup
On Dec 13, 2005, at 4:18 AM, Nouguier Olivier wrote: Even if you coding java stuff. Eclipse IDE support hot class reloading. You just have to run tomcat/cocoon inside eclipse, and it's done. Does this work with remote debugging in Eclipse, or do you actually have to have Eclipse start the Java program? —ml— - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to configure the location of external services in the sitemap
Fred Vos wrote: At work we are working on a Cocoon application that uses http requests in generators. The base URLs in these requests differ for each instance of our application. We don't want people to edit the sitemap to change URLs of these external services, everytime the sitemap changes. During development we also want to keep our local configuration. Furthermore we generate links to external services and these links also differ for each instance of the application. A simple approach is to generate a sitemap.xmap file using a template file for the sitemap and an XML document containing a list of external services. A simple XSLT script can transform the template sitemap file into a sitemap file. This requires regenerating the sitemap file after changing either the sitemap template or the file with base-URLs. For generating links, the XML document with base URLs can be used in the XSL script that generates HTML. Maybe there are better ways to solve this problem. If anyone has a good solution and scripts available, please let me know. Over in the Forrest project we have an InputModule called a locationmap [1]. This will be ideal for your problem. You can either create a locationmap for each individidual deployment of your application, or you can dynamically create it at runtime. Although this is a part of Forrest, you can easily lift the required source files for your project if you don't want to use the whole of Forrest. It would be great to se this code moved into a Cocoon block to facilitate its reuse in projects such as yours. We'd be happy to help you identify the bits you need via the Forrest mailing lists [2]. (I can't guarentee to see you mails here, I don't read as this list as closely as the Forrest ones) Ross [1] http://forrest.apache.org/docs_0_80/locationmap.html [2] http://forrest.apache.org/mail-lists.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: server startup
Mark Lundquist wrote: On Dec 13, 2005, at 4:18 AM, Nouguier Olivier wrote: Even if you coding java stuff. Eclipse IDE support hot class reloading. You just have to run tomcat/cocoon inside eclipse, and it's done. Does this work with remote debugging in Eclipse, or do you actually have to have Eclipse start the Java program? �ml� In general, it works with Tomcat if you start it with JPDA enabled (on unix : $TOMCAT_HOME/bin/startup.sh jpda start) and connect a remote session from Eclipse. AC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: server startup
On Dec 13, 2005, at 11:07 AM, Adam Constabaris wrote: In general, it works with Tomcat if you start it with JPDA enabled (on unix : $TOMCAT_HOME/bin/startup.sh jpda start) and connect a remote session from Eclipse. Thanks... this should work with Jetty as well then, right? —ml— - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Textarea field problem with cforms/flow
No, What you are describing, is that you have a textarea in which you edit some text and save it in a database. The next time you edit the same textarea field, it already contains the text you saved before. When you save again, it doubles your enters, right? This is solved, by making sure, that with displaying the textarea field, you do not have xsl:copy-of select=xpath2yourfield-text/ (or ofcourse value-of), but you must have xsl:copy-of select=translate(xpath2yourfield-text, '#13;', '')/ So, you had it with Cforms isn't? So look up the file forms-field-styling.xsl. Look for textarea. Somewhere in that file, I am having xsl:template match=fi:field[fi:styling/@type='textarea'] textarea id=[EMAIL PROTECTED] name=[EMAIL PROTECTED] title={fi:hint} xsl:apply-templates select=. mode=styling/ !-- remove carriage-returns (occurs on certain versions of IE and doubles linebreaks at each submit) -- xsl:copy-of select=translate(fi:value/node(), '#13;', '')/ /textarea xsl:apply-templates select=. mode=common/ /xsl:template where you probably have a copy-of without the translate...use this one, that should really do the job, and nothing more. Make sure, that when you save this file, you eiter restart your site or make sure you change forms-samples-styling.xsl (trivial space or something) and save that xsl, since it imports the forms-field-styling.xsl. If you do not save this file, cocoon won't recognize that its imported xsl is changed, and nothing will change. Hope you manage AS AS Thanks for this... but I am not sure what to do with it? Do you suggest I have an extra XSLT post-processing the form? If so, how and where would I configure it? If not, what else should I be doing? Thanks! Derek [EMAIL PROTECTED] 2005/12/13 03:12 PM Experienced the same stupid behavior of textarea in combination with CFORMS. Quick and dirty solution: textarea id=interesses xsl:copy-of select=translate(xpath2yourfield-text, '#13;', '')/ /textarea If you don't want to spend much time on it, this solution works, if you do want to spend time, plz let me know if you find a decent solution AS I have data from a database that I display in a CForm and allow a user to update. The text is displayed in the textarea of a form; when there is a long string, the text simply wraps and all is fine. However, each time a CR is entered from the keyboard then, after the data gets saved to the database, an extra CR (#13;) gets added to each existing CR as well, resulting in more and more blank lines being inserted. How do I prevent this happening? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] . This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - 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] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - 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: Textarea field problem with cforms/flow
Hi, I've noticed this behaviour in one of my stylesheets when I was trying to output elements on separate lines. I added #13; and #10; to the output and saw that the #10; was translated as a newline but the #13; appeared literally in the resulting output. When a browser submits form data it submits newlines as a CR (#13;) and a LF (#10;) character. With these to something similar seems to happen in the output; Removing the #13; is a quick fix, but there seems to be an odd thing happening with the CR characters in Cocoon. Freek On 13-dec-2005, at 14:12, Ard Schrijvers wrote: Experienced the same stupid behavior of textarea in combination with CFORMS. Quick and dirty solution: textarea id=interesses xsl:copy-of select=translate(xpath2yourfield-text, '#13;', '')/ /textarea If you don't want to spend much time on it, this solution works, if you do want to spend time, plz let me know if you find a decent solution AS I have data from a database that I display in a CForm and allow a user to update. The text is displayed in the textarea of a form; when there is a long string, the text simply wraps and all is fine. However, each time a CR is entered from the keyboard then, after the data gets saved to the database, an extra CR (#13;) gets added to each existing CR as well, resulting in more and more blank lines being inserted. How do I prevent this happening? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - 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]
Re: server startup
Yes, it does work in Jetty. However, I noticed that when you replace a JAR file, things don't always reload correctly. Although the change is noticed, some files in it appear corrupted until you restart Jetty. I specifically have this problem with XSL files that are stored in an JAR. Freek. On 13-dec-2005, at 20:20, Mark Lundquist wrote: On Dec 13, 2005, at 11:07 AM, Adam Constabaris wrote: In general, it works with Tomcat if you start it with JPDA enabled (on unix : $TOMCAT_HOME/bin/startup.sh jpda start) and connect a remote session from Eclipse. Thanks... this should work with Jetty as well then, right? —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]
Question about serializers
I asked a few days ago about creating a PDF on a background thread (Subject:Create PDF on background) but didn't got an answer I could use. Our users requests the PDF and it cannot be batched. Sometimes it takes a few minutes to be created. What I want to do is something like this: map:match pattern=background-pdf-document map:generate type=custom_generator src=/ map:transform src=my_transform.xsl/ map:serialize type=background !-- pipeline for pdf (or anything) to be run in the background -- !-- because it takes a while to be created -- map:parameter name=actual_pipeline value=cocoon:/pdf_pipeline type=fo2pdf/ !-- pipeline to display progress of pipeline 1 refreshing it until pipeline 1 is done? -- map:parameter name=progress_pipeline value=cocoon:/progress_pipeline type=html/ /map:serialize /map:match Is something like this possible? Maybe a custom serializer? Is there another way to do this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about serializers
Hello Fawzib, what you are suggesting/trying seems quite impossible to me? But, I am just wondering, why would take it so long for the pdf's to be generated? I suppose you are generating a pdf from several xml docs and serialize it to pdf? Well, do the xml docs change every minute? Why can't you just solve it by smart caching? Do you know which pdfs need to be generated? If you know this, and you really want to do a background creation, use a cron job for this and cache it...or save it as pdf and serve that one A few minutes to be generated, how large are they -Original Message- From: Fawzib Rojas [mailto:[EMAIL PROTECTED] Posted At: dinsdag 13 december 2005 22:01 Posted To: Cocoon User List Conversation: Question about serializers Subject: Question about serializers Importance: High I asked a few days ago about creating a PDF on a background thread (Subject:Create PDF on background) but didn't got an answer I could use. Our users requests the PDF and it cannot be batched. Sometimes it takes a few minutes to be created. What I want to do is something like this: map:match pattern=background-pdf-document map:generate type=custom_generator src=/ map:transform src=my_transform.xsl/ map:serialize type=background !-- pipeline for pdf (or anything) to be run in the background -- !-- because it takes a while to be created -- map:parameter name=actual_pipeline value=cocoon:/pdf_pipeline type=fo2pdf/ !-- pipeline to display progress of pipeline 1 refreshing it until pipeline 1 is done? -- map:parameter name=progress_pipeline value=cocoon:/progress_pipeline type=html/ /map:serialize /map:match Is something like this possible? Maybe a custom serializer? Is there another way to do this? - 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]
How to do multi-row updates in cocoon?
Hi all! Given a set of checkbox values that are submitted through an html form, what's the best way to loop through the submitted values to update more than one row in a table? Imagine a table called 'message_table': mid | message | status +-+--- 1 | Text1 | H 2 | Text2 | H 3 | Text3 | H 4 | Text4 | H A web page presents the user with all messages flagged with 'H'. User checks messages 1,3 and 4 and submits form. (i.e. approved=1approved=3approved=4) After performing postgreSQL update, rows 1, 3 and 4 would be updated to: mid | message | status +-+--- 1 | Text1 | A 2 | Text2 | H 3 | Text3 | A 4 | Text4 | A Since I'm using postgreSQL, I tried writing: CREATE OR REPLACE FUNCTION update_messages(approved integer) RETURNS integer AS $body$ DECLARE new_status varchar; new_sample record; BEGIN new_status := 'A'; FOR new_sample IN SELECT * FROM message_table WHERE status='H' ORDER BY mid LOOP UPDATE message_table SET status = new_status WHERE mid = approved; END LOOP; RETURN 1; END; $body$ LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; and calling the function in XSP with: SELECT update_messages(xsp-request:get-parameter name=approved/); Unfortunately, my function as written only updates the first value submitted (mid 1), and doesn't loop through the other two values submitted. Can someone help me from getting ulcers? What method would you use to update all rows in one shot? Thanks! Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about serializers
Fawzib Rojas wrote: I asked a few days ago about creating a PDF on a background thread (Subject:Create PDF on background) but didn't got an answer I could use. Our users requests the PDF and it cannot be batched. Sometimes it takes a few minutes to be created. What I want to do is something like this: map:match pattern=background-pdf-document map:generate type=custom_generator src=/ map:transform src=my_transform.xsl/ map:serialize type=background !-- pipeline for pdf (or anything) to be run in the background -- !-- because it takes a while to be created -- map:parameter name=actual_pipeline value=cocoon:/pdf_pipeline type=fo2pdf/ !-- pipeline to display progress of pipeline 1 refreshing it until pipeline 1 is done? -- map:parameter name=progress_pipeline value=cocoon:/progress_pipeline type=html/ /map:serialize /map:match Is something like this possible? Maybe a custom serializer? Is there another way to do this? Seems to me you could accomplish this fairly easily with Flowscript. Something like: function pdfDocumentFlow() { // Start the PDF running in the background, it will be // written to the OutputStream: var outputStream = new MySpecialOutputStream(); cocoon.processPipelineTo( pdf-generation-pipeline, {param1:value1, param2:value2}, outputStream ); // Display the waiting page until complete: while(!outputStream.isClosed()) { sendPageAndWait(waiting-screen); } // PDF is finished, now display it: cocoon.sendPage( pdf-display-pipeline, {byteArray : outputStream.toByteArray()} ); } Where pdf-generation-pipeline is the normal pipeline producing your PDF document, waiting-screen is obviously the screen saying the operation is still in process (and probably refreshes occasionally to call the continuation), and pdf-display-pipeline is a pipeline that simply reads from the byte array you pass it from the flow, e.g. map:match pattern=pdf-display-pipeline map:read src={module:flow-attr:byteArray} mime-type=application/x-pdf / /map:match The other big missing piece is finding or creating an OutputStream implementation (MySpecialOutputStream in the above code) that knows when it's been closed, so you can test for when the PDF has been completely generated. You can create a Java class that extends ByteArrayOutputStream or FileOutputStream, for instance. Or you can probably do this directly in Javascript as well, see http://www.mozilla.org/rhino/scriptjava.html for how to extend java classes in JS. This is all off the top of my head of course. Hope it at least gives you a starting point. --Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Processing of repeater row values in flowscript
I need to be able to do some pre- and post- processing of values that will be contained in repeater rows in a CForm. The form defn will look something like: fd:widgets fd:field id=title required=true fd:labelTitle/fd:label fd:datatype base=string/ /fd:field fd:repeater id=terrains fd:widgets fd:output id=id fd:datatype base=integer/ /fd:output fd:field id=terr_name fd:datatype base=string/ fd:labelName/fd:label /fd:field fd:field id=terr_size fd:datatype base=integer/ fd:labelName/fd:label /fd:field fd:booleanfield id=select fd:labelSelect/fd:label /fd:booleanfield /fd:widgets /fd:repeater fd:repeater-action id=addterrain action-command=add-row repeater=terrains fd:labelAdd terrain/fd:label /fd:repeater-action fd:repeater-action id=removeterrain action-command=delete-rows repeater=terrains select=select fd:labelRemove selected terrain/fd:label /fd:repeater-action /fd:widgets The form will be created as usual: var editDataForm = new Form(view/forms/editForm_d.xml); var model = editDataForm.getModel(); 1. PRE-PROCESSING I then need to assign data to the various elements. For the single value field it is simple: //assign data to the form/model model.title = Dummy; But - how to create the repeater rows and assign a set of values to them? 2. POST-PROCESSING When post-processing, I again need to process the repeater rows - bearing in mind the user could have added or deleted some/all of the rows... The value from the single value field is contained in the model.title variable; but, again - how to know how many repeater values exist, and what their values are? I am sure this is not complex, but I have not been able to find any examples on the Cocoon site or in past messages. Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]