Re: dictionnaire de données centralisé : interface de saisie
Arnaud Blancher wrote: Sylvain Wallez wrote: Lucas Arnaud wrote: Je vais essayer d'être plus clair : Pour gérer un satellite, on a plusieurs centres de traitement : - un qui est chargé de piloter le satellite - un ou plusieurs chargés de programmer les instruments à bord - un ou plusieurs clients qui reçoivent les résultats - un pour planifier tout ça Tous ces centres s'envoient mutuellement des fichiers (dans mon projet, c'est du XML). Ces fichiers sont décrits en XML Schema. L'idée, c'est donc d'avoir un serveur regroupant tous les types Schema utilisés dans tous les systèmes pour garantir la cohérence. La description des fichiers se fait alors simplement en utilisant l'ordre xs:import du Schema. Donc mon serveur est vu comme un dictionnaire de types XML Schema. En plus, on récupèrera les informations dans xs:annotation pour pouvoir générer des documents d'interface décrivant la structure des fichiers échangés. Ainsi, ceux qui ne lisent pas le Schema, pourront quand même y comprendre quelque chose. Voilà ce que je veux faire, le tout avec cocoon... C'est un bon choix :-) Plus sérieusement, un XMLSchema étant écrit en XML, il peut parfaitement entrer dans une chaîne de transformation pour en faire... un peu ce qu'on veut (même si ça serait plus facile avec RelaxNG) : écrans de saisie, docs lisibles, etc. D'un point de vu strictement théorique, je veux bien. on peut faire une interface de saisie a partir d'un schemas maintenant en passant du côté pratique, il y a pas mal de chose qui me dérange. exemple avec deux champs. 1 type de document 2 sous type. disons qu'il y a 4 type de documents: ta1,ta2,tb3,tb4 supossons que le sous type est liée au type: ta1 permet ta1st1, ta2st2, ta2 permet ta2st1,ta2st2, ta3 permet tb3st1,tb3st2, ta4 permet tb4st1,tb4st2 en xslt je dois men sortir (avec un peut de javascript dans l'interface client) mais , si je veux introduire une condition classique du style les possibilités du type de document sont en fonction du login ca se complique tres fortement, non ? vous traitrez toujours cela à partir du schemas ? Ca dépend. A ce niveau de complexité encore faible, on peut utiliser le schéma pour produire un formulaire CocoonForms (définition + template) utilisant les union (sous-formulaires variants selon la valeur d'un champ). Avec des schemas plus complexes, je me méfie des IHM entièrement autogénérées, qui sont souvent peu ergonomiques. Arnaud a mentionné l'utilisation des xs:annotation, qui sont un bon support pour mettre des indications de mise en forme des IHM pour produire des interfaces moins mécaniques. Et sur des schemas encore plus complexes, on fait ses CocoonForms à la main (on a fait ça pour un schéma se décomposant en plus de 50 écrans). avec des xslt ? Oui, mais pour produire les CocoonForms qui font ensuite tout le boulot. Pour ce qui est du filtrage par rapport au login, CocoonForms (encore lui) permet de donner un état au champ de saisie, le rendant soit non saisissable, soit carrément invisible. On a ainsi un unique formulaire qui peut facilement s'adapter aux permissions d'un utilisateur donné. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: plier/déplier dans les cocoon forms
Bonjour, j'ai eu à réaliser ce genre de plier/déplier lors d'un projet cocoon forms. Je crois qu'il n'y a pas de solution simple. La solution choisie a consisté a rajouter un élément de formulaire de type booléen à chaque noeud désiré. Ce booléen signifie 'ouvert' ou 'fermé' pour le noeud. (cela permet de conserver l'état des pliages lors d'un aller-retour serveur) Ensuite, il faut donner un aspect particulier à ce boolean (car on ne désire pas afficher une case à cocher) en créant un nouveau styling: celui-ci affichera un plus ou un moins selon le cas. Enfin, la zone qui doit se fermer et s'ouvrir doit posséder elle-aussi un styling particulier qui va consister à lire la valeur du booléen qui lui est rattachée et à s'afficher ou se cacher (au moyen d'une balise style='display: none' par exemple) Telle qu'elle est décrite ici, cette technique propose de faire un aller-retour serveur à chaque fois que l'on désire plier/déplier. Il est possible en écrivant un peu de javascript de la rendre utilisable sans aller-retour. Il va de soit, qu'il ne faut pas réaliser de mapping de ce champ booléen, puisque généralement on ne désire pas sauvegarder la configuration de pliage des noeuds. Raphaël FRANCHET Tel: +33 (0) 561 007 347 Anyware Technologies http://www.anyware-tech.com Tel: +33 (0) 561 005 290 Cathérine GOURGUET a écrit : Bonjour, j'ai une arborescence à faire (genre thème/sous-thème) avec les cocoon forms, et je me demandais s'il existait un genre de plier/déplier pour les afficher, étant donné qu'il y a beaucoup de thèmes, et que certains thèmes ont beaucoup de sous-thèmes. J'avais pensé à un repeater dans un repeater. C'est possible ? Il y a mieux ? Catherine - 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: cocoon forms et base de données
Le 27 janv. 05, à 15:47, Cathérine GOURGUET a écrit : Une autre question (décidément aujourd'hui, ça n'arrête pas !) : comment fait-on pour remplir un repeater à partir des données de la base : on met le code dans le binding ? et quel code ? quelqu'un aurait un exemple ? Il y a un petit exemple de binding sur un repeater dans le supersonic tour de Cocoon (dans blocks with samples), qui démontre le binding depuis un objet java qui contient une liste d'autres objets. Si tes données sont disponibles sous cette forme le lien avc CForms est assez simple. j'hope que cela helps (et ce n'est sûrement pas la dernière fois que vous m'entendrez mentionner le supersonic tour ;-) -Bertrand smime.p7s Description: S/MIME cryptographic signature
Re: plier/déplier dans les cocoon forms
Raphaël Franchet wrote: Les deux idées ne sont pas incompatibles. Pour mettre un état Invisible, je pense qu'il faudra insérer un élément de formulaire supplémentaire, car le repeater ne possède pas l'information 'visible/invisible'. Si :-) A partir de la verion 2.1.6, tous les widgets CForms on un state, prenant les valeurs active/disabled/invisible. Cet état est applicable à tous les widgets, y compris un repeater. Un widget invisible ne produit pas de valeur et ne lit pas la requête en retour. Toutefois, le repeater est un cas particulie puisque c'est le template de page qui construit la structure du repeater (genre une table autour). Si le template de présentation du formulaire utilise JXTG, on peut utiliser qq chose du style jx:if test=${form.lookupWidget(monrepeater).getState().isDisplayingValues()} ft:repeater ... /ft:repeater /jx:if On peut aussi faire plus simple en ajoutant un fd:struct sur les blocs qu'on veut plier/déplier. C'est alors l'état du struct qu'on va changer, et le test précédent est simplement remplacé par : ft:struct id=monblock /ft:struct Et puis, comme le propose Raphaël, il faudra ajouter un bouton plier/déplier dont l'action sera de permuter l'état du struct entre visible/invisible. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } - Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/ Pour vous desinscrire : mailto:[EMAIL PROTECTED] Autres commandes : mailto:[EMAIL PROTECTED]
Re: [flow] Hibernate createCriteria syntax help?
Il giorno 26/gen/05, alle 22:44, JD Daniels ha scritto: so I guess my next question would be : would you just forget having a hibernate factory as a cocoon component? ie, just have yet another class like package.hibernateFactoryImpl? see I'm thinking it is too much overhead to be registering classes at every request. You mean you are creating a SessionFactory for _every_ request? This is WAY too much overhead. The SessionFactory should be a singleton, no discussion about that! I'm just very confused :) You should really be using the Open Session in View pattern: http://hibernate.org/Documentation/OpenSessionInView Ugo -- Ugo Cei - http://agylen.com/blojsom/blog/ smime.p7s Description: S/MIME cryptographic signature
Re: [Poll] Portal deployment / Cocoon portal usage
1. Are you currently using the Cocoon Portal Framework? A) Yes we are using it. The following questions only if you are using the Cocoon Portal framework 3. Why did you choose the Cocoon portal framework? B) A strategic decision was made to use Open Source C) Becaus of the features of the framework 4. What do you think is currently missing from the Portal framework? A) Tools (which?) or tool support - Lotus Domino Support D) Better Documentation 5. How do you get support for the framework A) Through the mailing lists B) Reading the documentation and other publications D) We get external help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Portal] change content of a CachingURICoplet
Hello Cocooners, after several months of practicing cocoon it still takes me hours and days to get some tricky things working. Hope I'm not the only one making this experience ;) Let me explain what I'm trying to do and perhaps someone can help me with that. I've written a custom generator which makes a Lotus Domino connection and fetches xml out of a domino database. This generator is part of a pipeline which serves the content for a CachingURICoplet in the cocoon portal. The generator works similar to the Portal ProxyTransformer, that means it is making a http-connection to the domino server and using the domino specific url syntax. http://server/datbase/view?ReadViewEntriesRestrictToCategory=categoryCount=10 (returns xml stream) The initial parameters are passed to the generator through the coplet-data like this coplet-data id=ID name=standard titleTITLE/title coplet-base-dataCachingURICoplet/coplet-base-data attribute namebuffer/name value xsi:type=java:java.lang.Boolean xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; true /value /attribute attribute namehandleParameters/name value xsi:type=java:java.lang.Boolean xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; true /value /attribute attribute nameuri/name value xsi:type=java.lang.String xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; cocoon:/coplets/domino/view?server=[server] amp;database=[database] amp;designelement=View amp;designelementname=[viewname] amp;RestrictToCategory=[username] amp;Count=10 /value /attribute /coplet-data For the coplet content the following pipeline is triggered: map:match pattern=domino/view map:generate type=domino / map:transform src=styles/view2html.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=html / /map:match Now my problem: The domino server delivers only ten entries of the view because I told it so ('Count=10'). If there are more than ten entries in the view I need to generate links in the coplet which reload the content of the coplet with different URL parameters. This means the pipeline has to be executed again and the portal page has to be updated. So what I'm trying to implement is some kind of google-like paging mechanism which stays in the context of a portal coplet. I know that I have to generate portal-events and specify the copletId and portalName to do that, but I'm not sure which events I have to call and how to achieve that. Another possibility is that I'm completly wrong and I could use the ApplicationCoplet to realize this. But the ProxyTransformer seams to expect html or xhtml to work correctly and the LinkTransformer needs the content of a ProxyTransfomer Instance to translate links. So if there's any experienced cocoon portal user out there who can help me transforming domino urls into portal-events, I would really appreciate it. Thanks in advance, David Duhme. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bit of brotherly help...
Hi, I was just wondering if there are any cocoon heads out there who have access to an I.E browser on an windows platform that can tell me whether my site is visible when accessed from the browser? http://www.beyarecords.com If you view source in the browser, you will see that I have placed an external tag (test) around the html tag, and this tag picks up some xml info: test xmlns:cinclude=http://apache.org/cocoon/include/1.0; If I don't place the tag around the html tag I get: html xmlns:cinclude=http://apache.org/cocoon/include/1.0; When this happens none of the javascript will work in any browser on MAC OS X, but if I leave the tag in then nothing appears in an IE browser. All xsl pages are being transformed as xsltc and the serialize type is xhtml. What to do? regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: bit of brotherly help...
Uzo: I was just wondering if there are any cocoon heads out there who have access to an I.E browser on an windows platform that can tell me whether my site is visible when accessed from the browser? http://www.beyarecords.com It does appear. So that means it the cinclude namespace is causing a problem? All xsl pages are being transformed as xsltc and the serialize type is xhtml. I don't know if you can configure the cinclude transformer to remove the namespace (possibly?), but you could run a stylesheet at the end of your pipeline (just before serialization) to strip the cinclude namespace. HTH. Con - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Include pipeline content in another servlet
Hi cocooners, For some design constrainst, I would like from another servlet, to tell Cocoon to output files. A wrapper has been made around the CocoonServlet to redirect servlet outputstream to a file. That's the existing part. Then in a servlet I would like to tell Cocoon to output a file here is a snippet : request.getRequestDispatcher(cocoonPipeline).include(request, response); The problem is that Cocoon bases request processing over the request.getServletPath() to get the URI, and this don't change from the request that originally called the calling servlet... So is there a better and working method to call file outputting to the Cocoon servlet from another servlet ? Thanks, -- Olivier Billard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
beyaRecords wrote: Hi, I was just wondering if there are any cocoon heads out there who have access to an I.E browser on an windows platform that can tell me whether my site is visible when accessed from the browser? http://www.beyarecords.com Yes, I can see your site properly on my winxp with IE6 as well as on firefox! If you view source in the browser, you will see that I have placed an external tag (test) around the html tag, and this tag picks up some xml info: test xmlns:cinclude=http://apache.org/cocoon/include/1.0; If I don't place the tag around the html tag I get: html xmlns:cinclude=http://apache.org/cocoon/include/1.0; When this happens none of the javascript will work in any browser on MAC OS X, but if I leave the tag in then nothing appears in an IE browser. All xsl pages are being transformed as xsltc and the serialize type is xhtml. What to do? Well if you experience problems with namespaces popping up in your xhtml you can always remove all of them by extending the XMLSerializer: public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } This way no xmlns:cinclude=http://apache.org/cocoon/include/1.0; will bother your html page. (I did the same to avoid pages with unreadable xml, containing dozens of xmlns on various elements) Kind Regards, Jan regards Uzo - 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: [Portal] change content of a CachingURICoplet
Hi David, As you have realized, the portal doesn't use request parameters, but events and actions. When you request a portal page, this page calls each portlet that described it. Each portlet has its own set of parameters you can use in your pipeline. For example, you may have a portlet, with the following parameters described in your portal or copletinstancedata/portal-role-zzz.xml files : * database (your notes database) * query (your query) * sortQuery (the sort query to use) * browseQuery (the page number you want) * count (the number of results you want) Let's say you generate your pipeline call with all of these parameters (through {coplet:attributes/query}, ... in your generator) So, to solve your problem in this situation, you just have to update the browseQuery attribute. Then the portlet will be called again and the result will be there. To do that, just put the following where you want to generate the link to next/previous page : cl:links cl:link coplet=your-porlet-instance path=attributes/browseQuery value=2/ cl:content Page 2 /cl:content /cl:links cl:links cl:link coplet=your-porlet-instance path=attributes/browseQuery value=3/ cl:content Page 3 /cl:content /cl:links And, so on You may put several cl:link, this way you can change several parameter values in one link. HTH David Duhme a écrit : Hello Cocooners, after several months of practicing cocoon it still takes me hours and days to get some tricky things working. Hope I'm not the only one making this experience ;) Let me explain what I'm trying to do and perhaps someone can help me with that. I've written a custom generator which makes a Lotus Domino connection and fetches xml out of a domino database. This generator is part of a pipeline which serves the content for a CachingURICoplet in the cocoon portal. The generator works similar to the Portal ProxyTransformer, that means it is making a http-connection to the domino server and using the domino specific url syntax. http://server/datbase/view?ReadViewEntriesRestrictToCategory=categoryCount=10 (returns xml stream) The initial parameters are passed to the generator through the coplet-data like this coplet-data id=ID name=standard titleTITLE/title coplet-base-dataCachingURICoplet/coplet-base-data attribute namebuffer/name value xsi:type=java:java.lang.Boolean xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; true /value /attribute attribute namehandleParameters/name value xsi:type=java:java.lang.Boolean xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; true /value /attribute attribute nameuri/name value xsi:type=java.lang.String xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; cocoon:/coplets/domino/view?server=[server] amp;database=[database] amp;designelement=View amp;designelementname=[viewname] amp;RestrictToCategory=[username] amp;Count=10 /value /attribute /coplet-data For the coplet content the following pipeline is triggered: map:match pattern=domino/view map:generate type=domino / map:transform src=styles/view2html.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=html / /map:match Now my problem: The domino server delivers only ten entries of the view because I told it so ('Count=10'). If there are more than ten entries in the view I need to generate links in the coplet which reload the content of the coplet with different URL parameters. This means the pipeline has to be executed again and the portal page has to be updated. So what I'm trying to implement is some kind of google-like paging mechanism which stays in the context of a portal coplet. I know that I have to generate portal-events and specify the copletId and portalName to do that, but I'm not sure which events I have to call and how to achieve that. Another possibility is that I'm completly wrong and I could use the ApplicationCoplet to realize this. But the ProxyTransformer seams to expect html or xhtml to work correctly and the LinkTransformer needs the content of a ProxyTransfomer Instance to translate links. So if there's any experienced cocoon portal user out there who can help me transforming domino urls into portal-events, I would really appreciate it. Thanks in advance, David Duhme.
Re: Include pipeline content in another servlet
Olivier Billard wrote: Hi cocooners, For some design constrainst, I would like from another servlet, to tell Cocoon to output files. A wrapper has been made around the CocoonServlet to redirect servlet outputstream to a file. That's the existing part. Then in a servlet I would like to tell Cocoon to output a file here is a snippet : request.getRequestDispatcher(cocoonPipeline).include(request, response); The problem is that Cocoon bases request processing over the request.getServletPath() to get the URI, and this don't change from the request that originally called the calling servlet... So is there a better and working method to call file outputting to the Cocoon servlet from another servlet ? Thanks, -- Olivier Billard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] use of CocoonBean maybe ? http://cocoon.apache.org/2.1/userdocs/offline/bean.html -- Leszek Gawron [EMAIL PROTECTED] Project ManagerMobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
On 27 Jan 2005, at 10:43, Jan Hoskens wrote: public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } Hi Jan, I like the sound of what you are saying but could you please expand on your explanation? So I create my new XMLSerializer class but how do I call it into my sitemap? many regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
beyaRecords wrote: On 27 Jan 2005, at 10:43, Jan Hoskens wrote: public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } Hi Jan, I like the sound of what you are saying but could you please expand on your explanation? So I create my new XMLSerializer class but how do I call it into my sitemap? ordinary xml serializer is defined as : map:serializer logger=sitemap.serializer.xml mime-type=text/xml name=xml src=org.apache.cocoon.serialization.XMLSerializer/ so do your own declaration map:serializer logger=sitemap.serializer.myxml mime-type=text/xml name=myxml src=org.apache.cocoon.serialization.MyExtendedXMLSerializer/ and then: map:serialize type=myxml/ -- Leszek Gawron [EMAIL PROTECTED] Project ManagerMobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
On 27 Jan 2005, at 11:25, Leszek Gawron wrote: map:serializer logger=sitemap.serializer.myxml mime-type=text/xml name=myxml src=org.apache.cocoon.serialization.MyExtendedXMLSerializer/ and then: map:serialize type=myxml/ Leszek, got it! Thanks very much for that heads up. regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: transformation from XML to excel only works with one element set
jxtg? okay, but i need microsoft excel as and ouput format and i do't see how JXTG could help me here... i would need one excel-row for each row element... i was thinking that i miss a xsl:for-each ... instruction but i dunno where/how to apply this... (the transformation works fine to WML and PDF btw) any hints? (stylesheet see below) thanks a lot! philipp Yep. Your guess is right! You are overwrite the first with the second. You need to use a variable to move to the next row. As a solution, try to use JXTemplate. Best Regards, Antonio Gallardo. On Mie, 26 de Enero de 2005, 6:04, Philipp Rech dijo: Hello Cocooners, [Cocoon Version 2.1.6] i have the following xml file (see below) which is the result of a db querry (from Cocoon)... when i transfrom it with the stylesheet (see below) using the transfomer within Cocoon an excel sheet opens but with only one row in it (the one with the last id) but i need all elements in diferent rows... so only the last row element with the eventid2/eventid gets displayed but not both of them... my guess was thet the first one is processed but is overwritten by the last one (see my xml and xsl file below) thank you very much! phil ps: i already asekd on the poi-user list but got no reply... here is my xml file: ?xml version=1.0 encoding=ISO-8859-1 ? page content rowset xmlns:sql=http://apache.org/cocoon/SQL/2.0; xmlns=http://apache.org/cocoon/SQL/2.0; row eventid3/eventid typeofcontrolControl Type A/typeofcontrol trafficdirectionEntry/trafficdirection checkpointBlue Border/checkpoint klassificationilligal/klassification checklocationblack sea/checklocation guard_1Philipp/guard_1 guard_2Peter Pan/guard_2 objectionsmug/objection dtg2005-01-01/dtg locationblack sea/location description/description numberofpersons3/numberofpersons observedYes/observed /row row eventid2/eventid typeofcontrolControl Type B/typeofcontrol trafficdirectionLeave/trafficdirection checkpointAirport/checkpoint klassificationilligal entry/klassification checklocationairport hall 2/checklocation guard_1Philipp/guard_1 guard_2Stepht/guard_2 objectionilligal enrty/objection dtg2005-01-12/dtg locationairport somewhere/location descriptionnone/description numberofpersons1/numberofpersons observedNo/observed /row /rowset /content /page - here is my xsl file: - ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:sql=http://apache.org/cocoon/SQL/2.0; xmlns:gmr=http://www.gnome.org/gnumeric/v7; xsl:template match=/ gmr:Workbook xmlns:gmr=http://www.gnome.org/gnumeric/v7; gmr:Sheets gmr:Sheet DisplayFormulas=false HideZero=false HideGrid=false HideColHeader=false HideRowHeader=false DisplayOutlines=true OutlineSymbolsBelow=true OutlineSymbolsRight=true gmr:NameBIHS - Event Data/gmr:Name gmr:MaxCol2/gmr:MaxCol gmr:Cols DefaultSizePts=48 gmr:ColInfo No=0 Unit=48 MarginA=2 MarginB=2 Count=7/ /gmr:Cols gmr:Rows DefaultSizePts=12.8 gmr:RowInfo No=0 Unit=12.8 MarginA=0 MarginB=0 Count=9/ gmr:RowInfo No=10 Unit=12.8 MarginA=1 MarginB=0 Count=24/ /gmr:Rows gmr:Cells xsl:apply-templates/ /gmr:Cells /gmr:Sheet /gmr:Sheets /gmr:Workbook /xsl:template xsl:template match=sql:eventid gmr:Cell Col=0 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute name=Row xsl:value-of select=$rownumber/ /xsl:attribute gmr:Content xsl:apply-templates/ /gmr:Content /gmr:Cell /xsl:template xsl:template match=sql:typeofcontrol gmr:Cell Col=1 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute name=Row xsl:value-of select=$rownumber/ /xsl:attribute gmr:Content xsl:apply-templates/ /gmr:Content /gmr:Cell /xsl:template xsl:template match=sql:trafficdirection gmr:Cell Col=2 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute
Re: bit of brotherly help...
FYI: I use this declaration for my xhtml serialization: map:serializer logger=sitemap.serializer.xhtml mime-type=text/html; charset=utf-8 name=xhtml pool-grow=2 pool-max=64 pool-min=10 src=org.mycompany.cocoon.serialization.XMLSerializer doctype-public-//W3C//DTD XHTML 1.0 Strict//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system encodingUTF-8/encoding /map:serializer Kind Regards, Jan beyaRecords wrote: On 27 Jan 2005, at 10:43, Jan Hoskens wrote: public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } Hi Jan, I like the sound of what you are saying but could you please expand on your explanation? So I create my new XMLSerializer class but how do I call it into my sitemap? many regards Uzo - 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: bit of brotherly help...
On 27 Jan 2005, at 10:43, Jan Hoskens wrote: public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } Hi, i'm gonna call this class from my own package as so: package test all I need to know is what package I need to import and what jar file it sits in? so: package test import ? public class myXMLSerializer extends org.apache.cocoon.serialization.XMLSerializer regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: transformation from XML to excel only works with one element set
You might want to try this: gmr:Cells xsl:apply-templates select=page/content/rowset/row xsl:with-param name=rowposition select=position()/ /xsl:apply-templates /gmr:Cells and then use xsl:param name=rowposition/ where you need to set Row= instead of re-counting your rows every time. Also this: you might want to set your Row directly through a shortcut: gmr:Cell Row={$rowposition} as the content of {} will be evaluated by xsl. xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute name=Row xsl:value-of select=$rownumber/ /xsl:attribute Didn't try this myself but think this might work. Kind Regards, Jan Philipp Rech wrote: Hello Cocooners, [Cocoon Version 2.1.6] i have the following xml file (see below) which is the result of a db querry (from Cocoon)... when i transfrom it with the stylesheet (see below) using the transfomer within Cocoon an excel sheet opens but with only one row in it (the one with the last id) but i need all elements in diferent rows... so only the last row element with the eventid2/eventid gets displayed but not both of them... my guess was thet the first one is processed but is overwritten by the last one (see my xml and xsl file below) thank you very much! phil ps: i already asekd on the poi-user list but got no reply... here is my xml file: ?xml version=1.0 encoding=ISO-8859-1 ? page content rowset xmlns:sql=http://apache.org/cocoon/SQL/2.0; xmlns=http://apache.org/cocoon/SQL/2.0; row eventid3/eventid typeofcontrolControl Type A/typeofcontrol trafficdirectionEntry/trafficdirection checkpointBlue Border/checkpoint klassificationilligal/klassification checklocationblack sea/checklocation guard_1Philipp/guard_1 guard_2Peter Pan/guard_2 objectionsmug/objection dtg2005-01-01/dtg locationblack sea/location description/description numberofpersons3/numberofpersons observedYes/observed /row row eventid2/eventid typeofcontrolControl Type B/typeofcontrol trafficdirectionLeave/trafficdirection checkpointAirport/checkpoint klassificationilligal entry/klassification checklocationairport hall 2/checklocation guard_1Philipp/guard_1 guard_2Stepht/guard_2 objectionilligal enrty/objection dtg2005-01-12/dtg locationairport somewhere/location descriptionnone/description numberofpersons1/numberofpersons observedNo/observed /row /rowset /content /page - here is my xsl file: - ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:sql=http://apache.org/cocoon/SQL/2.0; xmlns:gmr=http://www.gnome.org/gnumeric/v7; xsl:template match=/ gmr:Workbook xmlns:gmr=http://www.gnome.org/gnumeric/v7; gmr:Sheets gmr:Sheet DisplayFormulas=false HideZero=false HideGrid=false HideColHeader=false HideRowHeader=false DisplayOutlines=true OutlineSymbolsBelow=true OutlineSymbolsRight=true gmr:NameBIHS - Event Data/gmr:Name gmr:MaxCol2/gmr:MaxCol gmr:Cols DefaultSizePts=48 gmr:ColInfo No=0 Unit=48 MarginA=2 MarginB=2 Count=7/ /gmr:Cols gmr:Rows DefaultSizePts=12.8 gmr:RowInfo No=0 Unit=12.8 MarginA=0 MarginB=0 Count=9/ gmr:RowInfo No=10 Unit=12.8 MarginA=1 MarginB=0 Count=24/ /gmr:Rows gmr:Cells xsl:apply-templates/ /gmr:Cells /gmr:Sheet /gmr:Sheets /gmr:Workbook /xsl:template xsl:template match=sql:eventid gmr:Cell Col=0 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute name=Row xsl:value-of select=$rownumber/ /xsl:attribute gmr:Content xsl:apply-templates/ /gmr:Content /gmr:Cell /xsl:template xsl:template match=sql:typeofcontrol gmr:Cell Col=1 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute name=Row xsl:value-of select=$rownumber/ /xsl:attribute gmr:Content xsl:apply-templates/ /gmr:Content /gmr:Cell /xsl:template xsl:template match=sql:trafficdirection gmr:Cell Col=2 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable xsl:attribute name=Row xsl:value-of select=$rownumber/ /xsl:attribute gmr:Content xsl:apply-templates/ /gmr:Content /gmr:Cell /xsl:template xsl:template match=sql:checkpoint gmr:Cell Col=3 ValueType=60 xsl:variable name=rownumberxsl:number level=any from=content count=row//xsl:variable
Re: bit of brotherly help...
Ok, I'll make it easy for you, just copy this: package org.yourcompany.cocoon.serialization; import org.xml.sax.SAXException; /** * A simple serializer, extending XMLSerializer to avoid getting namespaces in * output. (Thus only overriding prefixmapping methods to do nothing.) * * This is most usefull for xhtml outputting. * */ public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } Then compile with the following jars added to your buildpath: avalon-framework-api-4.2.0.jar avalon-framework-impl-4.2.0.jar cocoon-2.1.5.jar excalibur-sourceresolve-2.0.jar excalibur-xmlutil-1.0.jar excalibur-pool-1.2.jar regexp-1.3.jar I don't know if you need them all (last one probably not, other's not sure as I have other transformers/serializers/generators as well). These files can be found in your cocoon/WEB-INF/lib directory, possibly with another version. Kind Regards, Jan beyaRecords wrote: On 27 Jan 2005, at 10:43, Jan Hoskens wrote: public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer { public void endPrefixMapping(String prefix) throws SAXException { // do nothing } public void startPrefixMapping(String prefix, String uri) throws SAXException { // do nothing } } Hi, i'm gonna call this class from my own package as so: package test all I need to know is what package I need to import and what jar file it sits in? so: package test import ? public class myXMLSerializer extends org.apache.cocoon.serialization.XMLSerializer regards Uzo - 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: bit of brotherly help...
On 27 Jan 2005, at 12:23, Jan Hoskens wrote: Ok, I'll make it easy for you Jan, done and works a treat. many thanks. Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include pipeline content in another servlet
Thanks for your answer Leszek, Unfortunately, the Cocoon pipes are working with informations stored in session or request attributes... How do you handle these ? It would be too much work to change this to use only request params... -- Olivier Leszek Gawron wrote: Olivier Billard wrote: Hi cocooners, For some design constrainst, I would like from another servlet, to tell Cocoon to output files. A wrapper has been made around the CocoonServlet to redirect servlet outputstream to a file. That's the existing part. Then in a servlet I would like to tell Cocoon to output a file here is a snippet : request.getRequestDispatcher(cocoonPipeline).include(request, response); The problem is that Cocoon bases request processing over the request.getServletPath() to get the URI, and this don't change from the request that originally called the calling servlet... So is there a better and working method to call file outputting to the Cocoon servlet from another servlet ? Thanks, -- Olivier Billard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] use of CocoonBean maybe ? http://cocoon.apache.org/2.1/userdocs/offline/bean.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
decimal formatting
Hi, Currenlty I've got a Cocoon pipeline that generates HTML output by using a XSLT transformer where I'm using the following: xsl:value-of select=format-number(round(field), '##,##0.00')/ this all works fine and displays for example 12,345.99 but how can I setup this that it uses my country locale where the decimal separator is a comma and the thousand separator is a point? So the result would be 12.345,99 is there a way to set this for the whole Cocoon application? something like setting the locale for the xslt-transformer? and what with the woody field convertors? for example i've got the following widget declaration: wd:output id=price wd:label/ wd:datatype base=decimal wd:convertor variant=number wd:patterns wd:pattern#0.00/wd:pattern /wd:patterns /wd:convertor /wd:datatype /wd:output Any help is welcome! Regards, Gunter D'Hondt Sofico NV Belgium - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Portal] change content of a CachingURICoplet
Hi Jean-Christophe, first of all thanks for your reply. I think I haven't yet understood completly how to deal with coplet parameters. So with your hints I will try some new approaches. But I got another question. In which context do I use elements with the syntax cl:links cl:link coplet=your-porlet-instance path=attributes/browseQuery value=2/ cl:content Page 2 /cl:content /cl:links ? I'm generating links in an xslt stylesheet which is handled by the XSLT Transformer. Do I have to include a specific namespace to use these tags? Regards, David Duhme.
Re: bit of brotherly help...
On 27 Jan 2005, at 12:26, beyaRecords wrote: done and works a treat. many thanks. Ok, I have implemented the following: map:serializer logger=sitemap.serializer.xhtml mime-type=text/html name=myxml pool-grow=2 pool-max=64 pool-min=10 src=test.myXMLSerializer> doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN/doctype-public> doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/doctype-system> encoding>ISO-8859-1/encoding> /map:serializer> !-- = --> !-- Holding page --> !-- = --> map:match pattern=holding.xml> map:generate type=jx src=jx/holding.jx/> map:transform type=xsltc src=style/holding.xsl/> map:transform type=cinclude/> map:serialize type=myxml/> /map:match> And still when I view source in the browser I see: xmlns:cinclude=http://apache.org/cocoon/include/1.0 what am I doing wrong here? regards Uzo
undefined exception object in flow script try {} catch {} block
Hi, Using Cocoon 2.1.6, I don't seem to be getting the exception object passed through when catching an exception in flowscript; I've reduced it to the most simple case: function login() { try { throw bang; } catch (x) { cocoon.logger.debug(x); } } I get the error message 'The undefined value has no properties.', and sure enough, the Flow debugger says that x is undefined (actually it doesn't even exist). Any ideas? Ellis. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Include pipeline content in another servlet
Olivier Billard wrote: Thanks for your answer Leszek, Unfortunately, the Cocoon pipes are working with informations stored in session or request attributes... How do you handle these ? It would be too much work to change this to use only request params... have a look at: /src/java/org/apache/cocoon/environment/commandline/CommandLineSession.java -- Leszek Gawron [EMAIL PROTECTED] Project ManagerMobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Portal] change content of a CachingURICoplet
Hi David, Just declare the following namespace : xmlns:cl="http://apache.org/cocoon/portal/coplet/1.0" The cl:* will be transformed in events by the coplet transformer in the portal David Duhme a crit: Hi Jean-Christophe, first of all thanks for your reply. I think I haven't yet understood completly how to deal with coplet parameters. So with your hints I will try some new approaches. But I got another question. In which context do I use elements with the syntax cl:links cl:link coplet="your-porlet-instance" path="attributes/browseQuery" value="2"/ cl:content Page 2 /cl:content /cl:links ? I'm generating links in an xslt stylesheet which is handled by the XSLT Transformer. Do I have to include a specific namespace to use these tags? Regards, David Duhme. -- Jean-Christophe Kermagoret [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: undefined exception object in flow script try {} catch {} block
Ellis Pritchard wrote: Hi, Using Cocoon 2.1.6, I don't seem to be getting the exception object passed through when catching an exception in flowscript; I've reduced it to the most simple case: function login() { try { throw bang; } catch (x) { cocoon.logger.debug(x); } } I get the error message 'The undefined value has no properties.', and sure enough, the Flow debugger says that x is undefined (actually it doesn't even exist). cocoon.log.debug() http://cocoon.apache.org/2.1/userdocs/flow/api.html#Log+Object -- Leszek Gawron [EMAIL PROTECTED] Project ManagerMobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
At first sight, everything should be fine. A few things you can check: - your custom serializer doesn't contain any super.blablah(..) - the mentioned pipeline is the correct one and is called on its own. No other pipelines calling/including this one? Try altering the page to be sure it's the correct one. Check your logs to see where the sitemap matches your request. - restart the whole bunch (tomcat or whatever you're using) and clear the workdir if you're cocoon starts acting funny (can help sometimes) I'm using the serializer myself (3 different sites now) and am experiencing no problems concerning xmlns namespaces. Kind Regards, Jan beyaRecords wrote: On 27 Jan 2005, at 12:26, beyaRecords wrote: done and works a treat. many thanks. Ok, I have implemented the following: map:serializer logger=sitemap.serializer.xhtml mime-type=text/html name=myxml pool-grow=2 pool-max=64 pool-min=10 src=test.myXMLSerializer doctype-public-//W3C//DTD XHTML 1.0 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer !-- = -- !-- Holding page -- !-- = -- map:match pattern=holding.xml map:generate type=jx src=jx/holding.jx/ map:transform type=xsltc src=style/holding.xsl/ map:transform type=cinclude/ map:serialize type=myxml/ /map:match And still when I view source in the browser I see: *xmlns:cinclude=http://apache.org/cocoon/include/1.0* what am I doing wrong here? regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Portal] change content of a CachingURICoplet
do you know how to influence the generated a tags from this syntax. I want to include some css information like: a href="" class="mycss"linktext/a Thanks, Frank - Original Message - From: Jean-Christophe Kermagoret To: users@cocoon.apache.org Sent: Thursday, January 27, 2005 2:58 PM Subject: Re: [Portal] change content of a CachingURICoplet Hi David,Just declare the following namespace : xmlns:cl="http://apache.org/cocoon/portal/coplet/1.0"The cl:* will be transformed in events by the coplet transformer in the portalDavid Duhme a écrit: Hi Jean-Christophe, first of all thanks for your reply. I think I haven't yet understood completly how to deal with coplet parameters. So with your hints I will try some new approaches. But I got another question. In which context do I use elements with the syntax cl:links cl:link coplet="your-porlet-instance" path="attributes/browseQuery" value="2"/ cl:content Page 2 /cl:content /cl:links ? I'm generating links in an xslt stylesheet which is handled by the XSLT Transformer. Do I have to include a specific namespace to use these tags? Regards, David Duhme. -- Jean-Christophe Kermagoret [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: undefined exception object in flow script try {} catch {} block
Ok! Great first post; it was the logger causing the problem; it should have been: cocoon.log.debug(x) !! Ellis. Ellis Pritchard wrote: Hi, Using Cocoon 2.1.6, I don't seem to be getting the exception object passed through when catching an exception in flowscript; I've reduced it to the most simple case: function login() { try { throw bang; } catch (x) { cocoon.logger.debug(x); } } I get the error message 'The undefined value has no properties.', and sure enough, the Flow debugger says that x is undefined (actually it doesn't even exist). Any ideas? Ellis. - 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: [Portal] change content of a CachingURICoplet
Hi, Unfortunately, I don't know. I asked the same question a few days ago. You can use the following workaround. You put your link in a css div... HTH Frank Taffelt a crit: do you know how to influence the generated a tags from this syntax. I want to include some css information like: a href="" class="mycss"linktext/a Thanks, Frank - Original Message - From: Jean-Christophe Kermagoret To: users@cocoon.apache.org Sent: Thursday, January 27, 2005 2:58 PM Subject: Re: [Portal] change content of a CachingURICoplet Hi David, Just declare the following namespace : xmlns:cl="http://apache.org/cocoon/portal/coplet/1.0" The cl:* will be transformed in events by the coplet transformer in the portal David Duhme a crit: Hi Jean-Christophe, first of all thanks for your reply. I think I haven't yet understood completly how to deal with coplet parameters. So with your hints I will try some new approaches. But I got another question. In which context do I use elements with the syntax cl:links cl:link coplet="your-porlet-instance" path="attributes/browseQuery" value="2"/ cl:content Page 2 /cl:content /cl:links ? I'm generating links in an xslt stylesheet which is handled by the XSLT Transformer. Do I have to include a specific namespace to use these tags? Regards, David Duhme. -- Jean-Christophe Kermagoret [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jean-Christophe Kermagoret [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
On 27 Jan 2005, at 14:13, Jan Hoskens wrote: - your custom serializer doesn't contain any super.blablah(..) - the mentioned pipeline is the correct one and is called on its own. No other pipelines calling/including this one? Try altering the page to be sure it's the correct one. Check your logs to see where the sitemap matches your request. - restart the whole bunch (tomcat or whatever you're using) and clear the workdir if you're cocoon starts acting funny (can help sometimes) Jan, I have checked all that you mention and there is nothing out of place. h... puzzling! regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
beyaRecords wrote: On 27 Jan 2005, at 14:13, Jan Hoskens wrote: - your custom serializer doesn't contain any super.blablah(..) - the mentioned pipeline is the correct one and is called on its own. No other pipelines calling/including this one? Try altering the page to be sure it's the correct one. Check your logs to see where the sitemap matches your request. - restart the whole bunch (tomcat or whatever you're using) and clear the workdir if you're cocoon starts acting funny (can help sometimes) Jan, I have checked all that you mention and there is nothing out of place. h... puzzling! Hmm yeah, you got me there... ;-) If only I could meet that troublemaker head-on, grrr... What about a simple test with a page containing nothing but a few xmlns namespaces, running it through the html serializer once, check if there are xmlns (there should be) and then replace that serialzer by your customserializer and check again(there should be none)? btw, what version of cocoon are u using? (not that it should matter ...) Kind Regards, Jan regards Uzo - 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]
javaflow on weblogic 8.1sp2
I'm trying to get javaflow from Cocoon 2.1.5.1 working Weblogic 8.1sp2 with the application deployed as a .war file (i.e. not exploded) without much luck. I tweaked the ParanoidCocoonServlet so that it is loading jars out of /WEB-INF/lib/ (easy to do, but you need to use the Servlet 2.3 jar, not the 2.2 jar that Cocoon normally builds against). I see posts out there on the cocoon-users list indicating that people have approximately this config working...? I seem to be bumping into an initialization problem with the JavaInterpreter. It's calling ContinuationClassLoader.initialize(), which then throws a java.lang.NoSuchMethodError when trying to do Repository.setRepository() (that's in the BCEL jar). Ideas, prayers and samples from working configurations would be greatly appreciated ;) phil. -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
WHIRLYCOTT wrote: I'm trying to get javaflow from Cocoon 2.1.5.1 working Weblogic 8.1sp2 with the application deployed as a .war file (i.e. not exploded) without much luck. I tweaked the ParanoidCocoonServlet so that it is loading jars out of /WEB-INF/lib/ (easy to do, but you need to use the Servlet 2.3 jar, not the 2.2 jar that Cocoon normally builds against). I see posts out there on the cocoon-users list indicating that people have approximately this config working...? I seem to be bumping into an initialization problem with the JavaInterpreter. It's calling ContinuationClassLoader.initialize(), which then throws a java.lang.NoSuchMethodError when trying to do Repository.setRepository() (that's in the BCEL jar). Ideas, prayers and samples from working configurations would be greatly appreciated ;) phil. Weblogic.jar has its own versions of Rhino and BCEL in it. You can try to get the Cocoon versions to supercede them but then you might run into failures in other parts of Weblogic. We switch to Java flow just because of this. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bit of brotherly help...
On 27 Jan 2005, at 15:25, Jan Hoskens wrote: What about a simple test with a page containing nothing but a few xmlns namespaces, running it through the html serializer once, check if there are xmlns (there should be) and then replace that serialzer by your customserializer and check again(there should be none)? btw, what version of cocoon are u using? (not that it should matter ...) Jan, firstly i am running cocoon 2.1.6. My xslt file is specified top and bottom as follows: ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=/ test html /html /test /xsl:template xsl:template match=* xsl:element name={local-name()} xsl:apply-templates select=@*|xmlns|node()/ /xsl:element /xsl:template xsl:template match=@*|text() priority=-1 xsl:copy/ /xsl:template /xsl:stylesheet Now, as you can see I have 2 xmlns declarations and only the cinclude one appears all the time. So I changed the serializer type to html as you suggested and the xmlns line was still in the final html output!! Should I send my sitemap, xsl, and jxt file to you to have a look? regards Uzo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
Right, I'm trying to use Javaflow (i.e. not javascript). Did you have to make any WL specific configuration changes in the console or in weblogic.xml? I assume you are using the ParanoidCocoonServlet? Is your .war exploded? phil. Ralph Goers wrote: WHIRLYCOTT wrote: I'm trying to get javaflow from Cocoon 2.1.5.1 working Weblogic 8.1sp2 with the application deployed as a .war file (i.e. not exploded) without much luck. I tweaked the ParanoidCocoonServlet so that it is loading jars out of /WEB-INF/lib/ (easy to do, but you need to use the Servlet 2.3 jar, not the 2.2 jar that Cocoon normally builds against). I see posts out there on the cocoon-users list indicating that people have approximately this config working...? I seem to be bumping into an initialization problem with the JavaInterpreter. It's calling ContinuationClassLoader.initialize(), which then throws a java.lang.NoSuchMethodError when trying to do Repository.setRepository() (that's in the BCEL jar). Ideas, prayers and samples from working configurations would be greatly appreciated ;) phil. Weblogic.jar has its own versions of Rhino and BCEL in it. You can try to get the Cocoon versions to supercede them but then you might run into failures in other parts of Weblogic. We switch to Java flow just because of this. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Framework for Web application with multi-profile clients
Title: Framework for Web application with multi-profile clients Hello All I am new here with cocoon. I came here after I got some advices that this is the place where I can find some answers. I am looking for a web-framework that can help me with my requirement of supporting different profile customers. I.E. some of the customers will use PC, some will use PDA like IPAQ and some maybe WAP phones. The resolution is off-course different, the HTML / WML support is different and so on. What do you think ? Can Cocoon answer these requirements ? Thanks !! Elad Messing
Re: javaflow on weblogic 8.1sp2
WHIRLYCOTT wrote: Right, I'm trying to use Javaflow (i.e. not javascript). Did you have to make any WL specific configuration changes in the console or in weblogic.xml? I assume you are using the ParanoidCocoonServlet? Is your .war exploded? phil. I'll have to check with the guy who did the work when he comes in this morning. We normally deploy as an ear, but he might have run it exploded. I don't believe he was using ParanoidCocoonServlet. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Framework for Web application with multi-profile clients
Title: Framework for Web application with multi-profile clients Hi, definitely you are in the right place with the right product. Cocoon is the right solution for your requirement. Welcome a board Cheers Roberto - Original Message - From: Elad Messing To: users@cocoon.apache.org Sent: Thursday, January 27, 2005 4:46 PM Subject: Framework for Web application with multi-profile clients Hello All I am new here with cocoon. I came here after I got some advices that this is the place where I can find some answers. I am looking for a web-framework that can help me with my requirement of supporting different profile customers. I.E. some of the customers will use PC, some will use PDA like IPAQ and some maybe WAP phones.The resolution is off-course different, the HTML / WML support is different and so on.What do you think ? Can Cocoon answer these requirements ?Thanks !! Elad Messing
Re: bit of brotherly help...
beyaRecords wrote: On 27 Jan 2005, at 15:25, Jan Hoskens wrote: What about a simple test with a page containing nothing but a few xmlns namespaces, running it through the html serializer once, check if there are xmlns (there should be) and then replace that serialzer by your customserializer and check again(there should be none)? btw, what version of cocoon are u using? (not that it should matter ...) Jan, firstly i am running cocoon 2.1.6. My xslt file is specified top and bottom as follows: ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=/ test html /html /test /xsl:template xsl:template match=* xsl:element name={local-name()} xsl:apply-templates select=@*|xmlns|node()/ /xsl:element /xsl:template xsl:template match=@*|text() priority=-1 xsl:copy/ /xsl:template /xsl:stylesheet Now, as you can see I have 2 xmlns declarations and only the cinclude one appears all the time. So I changed the serializer type to html as you suggested and the xmlns line was still in the final html output!! Should I send my sitemap, xsl, and jxt file to you to have a look? Sure, send it, I'll take a look, I haven't got time to do it right away, but I can test it tomorrow if you like. Kind Regards, Jan regards Uzo - 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: [flow] Hibernate createCriteria syntax help?
Wait a minute ok I think I see now... project/java persistenceFactory.java - interface to cocoon's persistenceFactory, methods createSession HibernateFactory.java - implements persistenceFactory, methods configure, service, initialize, dispose, createSession Ok so far so good, when cocoon starts up, the hibernate factory is initialized, and the sessionfactory is in existence: cfg = new net.sf.hibernate.cfg.Configuration(); cfg.addClass(com.kismetsoftware.insecticide.Company.class); cfg.addClass(com.kismetsoftware.insecticide.Project.class); cfg.addClass(com.kismetsoftware.insecticide.Bug.class); cfg.addClass(com.kismetsoftware.insecticide.Comment.class); sf = cfg.buildSessionFactory(); I was thinking this would be moved to happen at every request, which I definately did not want. It makes sense now. So when I change the persistence mechanism, it *should* be only these two classes that need to be changed right? Moving forward, project/java bug.java POJO bugSearch.java methods like findbugsByStatus, findBugsByExample, etc. Heres my next confusion - I am using cocoon to handle my sessionFactory right? So stuff I have in my flow now like: // Create Hibernate Session var factory = cocoon.getComponent(Packages.com.kismetsoftware.insecticide.PersistenceFactory.ROLE); var hs = factory.createSession(); // Might as well quit now if the session is no good :( if (hs == null){throw new Packages.org.apache.cocoon.ProcessingException(Hibernate session is null );} // Look up our Entry var bean = hs.find(from com.kismetsoftware.insecticide.Bug WHERE id='+id+').get(0); Should change to: // Create Persistence Session var factory = cocoon.getComponent(Packages.com.kismetsoftware.insecticide.PersistenceFactory.ROLE); var hs = factory.createSession(); // Might as well quit now if the session is no good :( if (hs == null){throw new Packages.org.apache.cocoon.ProcessingException(Persistence session is null );} // Grab the class with the methods to do what we want (Constructor takes the session as an arguement) var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); // Look up our Entry var bean = bugSearch.findBugById(id); right? Or would it be better to have one class such as BugFacade with all methods dealing with bugs? (save, find, delete etc) Lastly, I am pretty sure the above would work, but to be really separate-y, what about: var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); var bean = bugSearch.findBugById(id); much simpler and really doesn't care how BugSearch does what it does. How would I get a grip on the cocoon component inside BugSearch.java? quote You should really be using the Open Session in View pattern: http://hibernate.org/Documentation/OpenSessionInView /quote Sorry, but this has confused me further.. where would this fit into a cocoon framework? JD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [flow] Hibernate createCriteria syntax help?
As a preface, the Cocoon-users list is probably not the best place to get Hibernate assistance, but here goes JD Daniels wrote: Wait a minute ok I think I see now... project/java persistenceFactory.java - interface to cocoon's persistenceFactory, methods createSession HibernateFactory.java - implements persistenceFactory, methods configure, service, initialize, dispose, createSession Ok so far so good, when cocoon starts up, the hibernate factory is initialized, and the sessionfactory is in existence: cfg = new net.sf.hibernate.cfg.Configuration(); cfg.addClass(com.kismetsoftware.insecticide.Company.class); cfg.addClass(com.kismetsoftware.insecticide.Project.class); cfg.addClass(com.kismetsoftware.insecticide.Bug.class); cfg.addClass(com.kismetsoftware.insecticide.Comment.class); sf = cfg.buildSessionFactory(); You should be declaring these inside hibernate.cfg.xml to avoid putting all this hardcoded junk in your code. What you are doing will work, but gives you pain with no gain, in your particular case. I was thinking this would be moved to happen at every request, which I definately did not want. It makes sense now. So when I change the persistence mechanism, it *should* be only these two classes that need to be changed right? You should only create one SessionFactory per application lifecycle. Should change to: // Create Persistence Session var factory = cocoon.getComponent(Packages.com.kismetsoftware.insecticide.PersistenceFactory.ROLE); Right, this is the part that I am less keen on. I don't see the point of creating this dependency between Cocoon and your backend. var hs = factory.createSession(); // Might as well quit now if the session is no good :( if (hs == null){throw new Packages.org.apache.cocoon.ProcessingException(Persistence session is null );} // Grab the class with the methods to do what we want (Constructor takes the session as an arguement) var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); Well, you shouldn't even be exposing any of this Hibernate stuff in the flow code at _all_. The Hibernate session is just wrapping your JDBC connection and whatever transaction JTA/JDBC transaction that you're currently in, so you could create a class to wrap that. // Look up our Entry var bean = bugSearch.findBugById(id); Yes, that's looking better. But call it a 'facade', so that others who work on your code will understand the role of bugSearch immediately just by looking at the name. right? Or would it be better to have one class such as BugFacade with all methods dealing with bugs? (save, find, delete etc) You can run into an anti-pattern quickly here, but you should ideally have all of your transactional and business logic methods exposed in one interface or class, not just your bug search stuff. (Aside: are you really writing _another_ bug tracking system...???) Lastly, I am pretty sure the above would work, but to be really separate-y, what about: var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); var bean = bugSearch.findBugById(id); Right. much simpler and really doesn't care how BugSearch does what it does. How would I get a grip on the cocoon component inside BugSearch.java? I don't think you should be, but maybe someone else has a good argument for creating this dependency. quote You should really be using the Open Session in View pattern: http://hibernate.org/Documentation/OpenSessionInView /quote Sorry, but this has confused me further.. where would this fit into a cocoon framework? Cocoon sits on top of a web container. The servlet 2.3 api supports servlet filters. What this person is suggesting is that you use a servlet filter to drop a hibernate session into a threadlocal that sits in the thread currently servicing your request. It's a very standard way of doing stuff like this... definitely take the time to understand that. phil. JD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to get value of browserselector in sitemap
On Jan 26, 2005, at 5:59 AM, Stefan Pietschmann wrote: Hi, I know how the BrowserSelector works, but I want to use its value as a parameter for one of my actions. Suggestion: instead of BrowserSelector, use a HeaderMatcher to get the value of the User-Agent header. ml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [flow] Hibernate createCriteria syntax help?
No, I'm not really writing another bug tracker. I have it so clients can login and peek at the timesheets for what we have done including stuff like printers, adsl etc etc. It is just a simple object so they can add feature requests or fixes for whatever they need. They all hate having to login more than once, so this is just simple - not nearly bugzilla power :) I was hoping this list would be ok, I can make a hibernate command line app do what I want ( Ie hello world again) It is getting it into cocoon that is my headache :) So I am off to read about filters .. this might be good way to do it and get all that crap out of my flow. Quick question for you before i go off into researchland: From what I have googled so far, it looks like people are only using the filter to trash sessions when they are done with them at the end of the request. For example, http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial still using a cocoon component to create the session. How are you creating the session in your business logic? JD WHIRLYCOTT wrote: As a preface, the Cocoon-users list is probably not the best place to get Hibernate assistance, but here goes JD Daniels wrote: Wait a minute ok I think I see now... project/java persistenceFactory.java - interface to cocoon's persistenceFactory, methods createSession HibernateFactory.java - implements persistenceFactory, methods configure, service, initialize, dispose, createSession Ok so far so good, when cocoon starts up, the hibernate factory is initialized, and the sessionfactory is in existence: cfg = new net.sf.hibernate.cfg.Configuration(); cfg.addClass(com.kismetsoftware.insecticide.Company.class); cfg.addClass(com.kismetsoftware.insecticide.Project.class); cfg.addClass(com.kismetsoftware.insecticide.Bug.class); cfg.addClass(com.kismetsoftware.insecticide.Comment.class); sf = cfg.buildSessionFactory(); You should be declaring these inside hibernate.cfg.xml to avoid putting all this hardcoded junk in your code. What you are doing will work, but gives you pain with no gain, in your particular case. I was thinking this would be moved to happen at every request, which I definately did not want. It makes sense now. So when I change the persistence mechanism, it *should* be only these two classes that need to be changed right? You should only create one SessionFactory per application lifecycle. Should change to: // Create Persistence Session var factory = cocoon.getComponent(Packages.com.kismetsoftware.insecticide.PersistenceFactory.ROLE); Right, this is the part that I am less keen on. I don't see the point of creating this dependency between Cocoon and your backend. var hs = factory.createSession(); // Might as well quit now if the session is no good :( if (hs == null){throw new Packages.org.apache.cocoon.ProcessingException(Persistence session is null );} // Grab the class with the methods to do what we want (Constructor takes the session as an arguement) var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); Well, you shouldn't even be exposing any of this Hibernate stuff in the flow code at _all_. The Hibernate session is just wrapping your JDBC connection and whatever transaction JTA/JDBC transaction that you're currently in, so you could create a class to wrap that. // Look up our Entry var bean = bugSearch.findBugById(id); Yes, that's looking better. But call it a 'facade', so that others who work on your code will understand the role of bugSearch immediately just by looking at the name. right? Or would it be better to have one class such as BugFacade with all methods dealing with bugs? (save, find, delete etc) You can run into an anti-pattern quickly here, but you should ideally have all of your transactional and business logic methods exposed in one interface or class, not just your bug search stuff. (Aside: are you really writing _another_ bug tracking system...???) Lastly, I am pretty sure the above would work, but to be really separate-y, what about: var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); var bean = bugSearch.findBugById(id); Right. much simpler and really doesn't care how BugSearch does what it does. How would I get a grip on the cocoon component inside BugSearch.java? I don't think you should be, but maybe someone else has a good argument for creating this dependency. quote You should really be using the Open Session in View pattern: http://hibernate.org/Documentation/OpenSessionInView /quote Sorry, but this has confused me further.. where would this fit into a cocoon framework? Cocoon sits on top of a web container. The servlet 2.3 api supports servlet filters. What this person is suggesting is that you use a servlet filter to drop a hibernate session into a threadlocal that sits in
Re: [flow] Hibernate createCriteria syntax help?
Il giorno 27/gen/05, alle 15:16, JD Daniels ha scritto: right? Or would it be better to have one class such as BugFacade with all methods dealing with bugs? (save, find, delete etc) Yes, that is usually preferrable. A class that deals with retrieving and storing domain objects to a persitent store is usually called a Data Access Object (DAO). Lastly, I am pretty sure the above would work, but to be really separate-y, what about: var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); var bean = bugSearch.findBugById(id); What's changed WRT to the previous version? I can't see the difference. Ugo -- Ugo Cei - http://agylen.com/blojsom/blog/ smime.p7s Description: S/MIME cryptographic signature
Re: [flow] Hibernate createCriteria syntax help?
Ugo Cei wrote: Il giorno 27/gen/05, alle 15:16, JD Daniels ha scritto: right? Or would it be better to have one class such as BugFacade with all methods dealing with bugs? (save, find, delete etc) Yes, that is usually preferrable. A class that deals with retrieving and storing domain objects to a persitent store is usually called a Data Access Object (DAO). Lastly, I am pretty sure the above would work, but to be really separate-y, what about: var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); var bean = bugSearch.findBugById(id); What's changed WRT to the previous version? I can't see the difference. var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); The cocoon component for the persisenceFactory , and the hibernate session opening and closing is gone from flow. so the whole function would be: function showBug() { var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); cocoon.sendPage(internal/generate-view/bug_summary, {title : Bug details, bug : bug}); } Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon on Weblogic 8 / Cocoon Forms standalone
Title: Message Hi Mark, For the first question, modify your sitemap.xmap The default is probably something like this: !-- main pipeline -- map:pipeline !-- welcome page -- map:match pattern="" Change it to this: !-- main pipeline -- map:pipeline !-- welcome page -- map:match pattern="index.html" I think the index.html portion of the url ( http://localhost:7001/cocoon/ )is added by Weblogic. I'm not sure on the answer to the second question. I'm guessing not. Regards, Mike -Original Message-From: Mark Hibbard [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 9:09 AMTo: users@cocoon.apache.orgSubject: Cocoon on Weblogic 8 / Cocoon Forms standalone Hi. Im totally new to Cocoon but have the following questions, which may just be damn stupid, or impossible, but if you dont ask 1) Ive tried to deploy Cocoon on weblogic 8 with a degree of success it deploys with no errors but not all pages seem to work ie. http://localhost:7001/cocoon/samples/blocks/forms/form1 works, yet the URL http://localhost:7001/cocoon/ does not work - no pipeline matced request: index.html I thought that would show the welcome to cocoon? 2) Is it possible to use just CocoonForms without the whole of cocoon. For example if Im writing my app and I want to use cocoon forms can I do this without integrating the whole of cocoon into my app? Thanks, and apologies if these questions are dumb! Mark
Re: [flow] Hibernate createCriteria syntax help?
Heh heh what I want anyway.. still need to find a way to actually *do* it :S WHIRLYCOTT wrote: I think you've basically got the hang of this now. phil. JD Daniels wrote: Ugo Cei wrote: Il giorno 27/gen/05, alle 15:16, JD Daniels ha scritto: right? Or would it be better to have one class such as BugFacade with all methods dealing with bugs? (save, find, delete etc) Yes, that is usually preferrable. A class that deals with retrieving and storing domain objects to a persitent store is usually called a Data Access Object (DAO). Lastly, I am pretty sure the above would work, but to be really separate-y, what about: var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(hs); var bean = bugSearch.findBugById(id); What's changed WRT to the previous version? I can't see the difference. var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); The cocoon component for the persisenceFactory , and the hibernate session opening and closing is gone from flow. so the whole function would be: function showBug() { var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); cocoon.sendPage(internal/generate-view/bug_summary, {title : Bug details, bug : bug}); } Ugo - 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: sendmail - Problems with cocoon protocol
Thorsten Scherler escribió: Hello list, I am having proplems with the cocoon:/ protocol in the email:attachment tag. email:attachment name=production.xml mime-type=text/xml url=cocoon:/test.xml / That is wrong! I need to use @src for cocoon:/... -- thorsten Together we stand, divided we fall Hey you (Pink Floyd) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [flow] Hibernate createCriteria syntax help?
Il giorno 27/gen/05, alle 17:09, JD Daniels ha scritto: What's changed WRT to the previous version? I can't see the difference. var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); Ah OK. I'll tell you a story :-) When we started using Hibernate with Cocoon, we used too get a session from a home-grown component that wrapped a SessionFactory and created Sessions on demand. Just like in your first version. Now we use Spring, which handles SessionFactory configuration, session creation (and guaranteed disposal), transactions and exception handling. Typically we define one (or a few) Service facades that are managed by Spring and interact with one or more DAOs in the backend. The flowscript deals exclusively with the service facade. If you want to develop robust, easily maintained and testable applications, I suggest you look closely at Spring. Ugo -- Ugo Cei - http://agylen.com/blojsom/blog/ smime.p7s Description: S/MIME cryptographic signature
Re: [flow] Hibernate createCriteria syntax help?
+1 on that, Ugo. JD, there's a decent O'Reilly book called Better, Faster, Lighter Java or something like that. It covers a lot of the ideas that we have been telling you about. It doesn't cover any Cocoon stuff, but the part you are working on shouldn't care about that at all. You might find it useful. phil. Ugo Cei wrote: Il giorno 27/gen/05, alle 17:09, JD Daniels ha scritto: What's changed WRT to the previous version? I can't see the difference. var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); Ah OK. I'll tell you a story :-) When we started using Hibernate with Cocoon, we used too get a session from a home-grown component that wrapped a SessionFactory and created Sessions on demand. Just like in your first version. Now we use Spring, which handles SessionFactory configuration, session creation (and guaranteed disposal), transactions and exception handling. Typically we define one (or a few) Service facades that are managed by Spring and interact with one or more DAOs in the backend. The flowscript deals exclusively with the service facade. If you want to develop robust, easily maintained and testable applications, I suggest you look closely at Spring. Ugo -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: bit of brotherly help...
Uzo wrote: firstly i am running cocoon 2.1.6. My xslt file is specified top and bottom as follows: ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=/ test html /html /test /xsl:template xsl:template match=* xsl:element name={local-name()} xsl:apply-templates select=@*|xmlns|node()/ /xsl:element /xsl:template xsl:template match=@*|text() priority=-1 xsl:copy/ /xsl:template /xsl:stylesheet Now, as you can see I have 2 xmlns declarations and only the cinclude one appears all the time. So I changed the serializer type to html as you suggested and the xmlns line was still in the final html output!! Should I send my sitemap, xsl, and jxt file to you to have a look? You have declared the namespace on the stylesheet element, but you haven't told the stylesheet processor to exclude it from the output. You need to use the exclude-result-prefixes attribute on the stylesheet. Con - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [flow] Hibernate createCriteria syntax help?
I sincerley appreciate the info you guys have shared with me :) thank you. that was where i was stuck - I knew I had to separate my concerns, but all the tutorials I found had a cocoon component dealing with hibernate stuff. Hibernate itself is rather nice. I have been doing it for awhile now using the cocoon persistencefactory component. However, everytime i got stuck, and asked on the list for help, I got Separate your stuff better heh heh. believe me I want to, and since you guys were so helpful with the issue this time, I chased it a little. I actually have a much better understanding of the cocoon involvement, and now know where to mess with it to fix it. Of course, I have trashed my project so badly that it currently won't build, but I am confident I can get it worked out. Right now, I had the idea of a filter for each request both open and close my session, but I haven't got it working yet. I guess I will take the plunge into spring right now. (Maybe past discussions on the dev list will start to make sense) Again thanks to both of you - you have truly expanded my knowledge. I had no idea a syntax question would put me so far ahead :) JD WHIRLYCOTT wrote: +1 on that, Ugo. JD, there's a decent O'Reilly book called Better, Faster, Lighter Java or something like that. It covers a lot of the ideas that we have been telling you about. It doesn't cover any Cocoon stuff, but the part you are working on shouldn't care about that at all. You might find it useful. phil. Ugo Cei wrote: Il giorno 27/gen/05, alle 17:09, JD Daniels ha scritto: What's changed WRT to the previous version? I can't see the difference. var bugSearch = new Packages.com.kismetsoftware.insecticide.BugSearch(); var bean = bugSearch.findBugById(id); Ah OK. I'll tell you a story :-) When we started using Hibernate with Cocoon, we used too get a session from a home-grown component that wrapped a SessionFactory and created Sessions on demand. Just like in your first version. Now we use Spring, which handles SessionFactory configuration, session creation (and guaranteed disposal), transactions and exception handling. Typically we define one (or a few) Service facades that are managed by Spring and interact with one or more DAOs in the backend. The flowscript deals exclusively with the service facade. If you want to develop robust, easily maintained and testable applications, I suggest you look closely at Spring. Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
So did your guy ever show up for work today? ;) phil. Ralph Goers wrote: WHIRLYCOTT wrote: Right, I'm trying to use Javaflow (i.e. not javascript). Did you have to make any WL specific configuration changes in the console or in weblogic.xml? I assume you are using the ParanoidCocoonServlet? Is your .war exploded? phil. I'll have to check with the guy who did the work when he comes in this morning. We normally deploy as an ear, but he might have run it exploded. I don't believe he was using ParanoidCocoonServlet. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Broken pipe exceptions
Hi, I am new to Cocoon. Getting the following exceptions in Cocoon'e error.log: java.net.SocketException: Broken pipe Could somebody please interpret them for me ? What might be causing it ? How to fix it ? Thank you in advance, Oleg. P.S.: Cocoon 2.0.4 on JBoss 3.0.7 javax.xml.transform.TransformerException: java.net.SocketException: Broken pipe at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:435) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:273) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3372) at java.lang.Thread.run(Thread.java:534) Caused by: java.net.SocketException: Broken pipe at org.apache.xalan.serialize.SerializerToXML.outputLineSep(SerializerToXML.java:199) at org.apache.xalan.serialize.SerializerToXML.indent(SerializerToXML.java:2419) at org.apache.xalan.serialize.SerializerToXML.endElement(SerializerToXML.java:1052) at org.apache.xalan.serialize.SerializerToHTML.endElement(SerializerToHTML.java:695) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
WHIRLYCOTT wrote: So did your guy ever show up for work today? ;) phil. Yeah, he did. He isn't using ParanoidCocoonServlet. He says all he did was put the xalan, xerces-impl and xml-apis jars into a lib/endorsed directory in our Weblogic project directory and then modified the Weblogic startup script to use that directory for endorsed overrides. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
Thanks, Ralph - I've tried that with no luck. But I'm curious to know if you mean that those 3 jars were put in the JDK's lib/endorsed/ directory? Because that shouldn't require modifying any startup scripts, if I understand this correctly. Would you mind confirming what the modification to the startup script does? Thanks again. phil. Ralph Goers wrote: WHIRLYCOTT wrote: So did your guy ever show up for work today? ;) phil. Yeah, he did. He isn't using ParanoidCocoonServlet. He says all he did was put the xalan, xerces-impl and xml-apis jars into a lib/endorsed directory in our Weblogic project directory and then modified the Weblogic startup script to use that directory for endorsed overrides. Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
WHIRLYCOTT wrote: Thanks, Ralph - I've tried that with no luck. But I'm curious to know if you mean that those 3 jars were put in the JDK's lib/endorsed/ directory? Because that shouldn't require modifying any startup scripts, if I understand this correctly. Would you mind confirming what the modification to the startup script does? Thanks again. phil. We don't put them in the JDK's lib/endorsed. We put them in lib/endorsed and then use -Djava.endorsed.dirs=lib/endorsed when starting Weblogic. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javaflow on weblogic 8.1sp2
Ok, I will try that. Two more questions: Are you using prefer-web-inf-classes in weblogic.xml? Do you have init-classloader set in web.xml? phil. Ralph Goers wrote: WHIRLYCOTT wrote: Thanks, Ralph - I've tried that with no luck. But I'm curious to know if you mean that those 3 jars were put in the JDK's lib/endorsed/ directory? Because that shouldn't require modifying any startup scripts, if I understand this correctly. Would you mind confirming what the modification to the startup script does? Thanks again. phil. We don't put them in the JDK's lib/endorsed. We put them in lib/endorsed and then use -Djava.endorsed.dirs=lib/endorsed when starting Weblogic. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ESQL and utf-8 encoding
Title: Message Thanks for all the help. It appears my data was corrupted in the database. Mike -Original Message-From: Martinson, Theresa [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 12:00 PMTo: users@cocoon.apache.orgSubject: RE: ESQL and utf-8 encoding We experienced a similar problem with the character encoding on the http request processed by Cocoon. We also were attempting to use UTF-8 encoding but found that the encoding would always default to ISO-8859-1. Looking at the request in a debugger, we found that the actual http request wrapped by the Cocoon HttpRequest did not have the character encoding properly set. We corrected this by modifying CocoonServlet to set the character encoding on the wrapped request to the form-encoding value specified in the web.xml. In order to set the character encoding, we needed to use the 2.3 version of the servlet jar. This solved our encoding problems for page display and for request parameter interpretation. We understand that this is not directly on point with your problem, but perhaps it may provide a basis for thought. Good luck. Theresa -Original Message-From: Lopke, Michael [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 7:18 PMTo: users@cocoon.apache.orgSubject: RE: ESQL and utf-8 encoding Hi, I'm following up on my previous post because I have done quite a bit of reading of the mail archives which has been helpful, but I'm still stuck. I placed some code in my original xsp file that looks like this: xsp:logic String debug_thing =EsqlHelper.getStringFromByteArray( _esql_query.getResultSet().getBytes ("display"), "" + "UTF-8" ,""); System.out.println("DEBUG " + debug_thing); /xsp:logic This was nested in side the esql:query. What I'm finding is that the string that gets printed out to the file is good utf-8. My problem is that the output I'm getting on my browser is still incorrect. Any ideas? I even modified the container encoding in the web.xml file and had no luck. Thanks, Mike Lopke -Original Message-From: Lopke, Michael Sent: Friday, January 21, 2005 10:20 AMTo: users@cocoon.apache.orgSubject: ESQL and utf-8 encoding Hi, Has anyone here used esql with data that is utf-8 encoded? I'm able to connect to my database and get the correct data but it appears that somewhere along the way the data is being interpreted as iso-8859-1 encoding. I'm not sure if I got all of the configurations correct. For example, the Chinese character. Shows up as this. In my sitemap.xmap I have the following: map:generators default="file" map:generator label="content,data" logger="sitemap.generator.file" name="file" pool-grow="4" pool-max="32" pool-min="8" src=""/ map:generator label="content,data" logger="sitemap.generator.serverpages" name="xsp" pool-grow="2" pool-max="32" pool-min="4" src=""/ /map:generators map:serializers default="html" ... map:serializer name="xml" src="" mime-type="text/xml; charset=utf-8" encodingUTF-8/encoding /map:serializer /map:serializers . !-- the XSP pages -- map:match pattern="*.xml" map:generate type="xsp" src=""/ map:serialize type="xml"/ /map:match The snippit in my xsp file looks like this: ... esql:results esql:row-results data esql:get-string column="display" esql:encodingUTF-8/esql:encoding /esql:get-string /data /esql:row-results /esql:results It looks like the generator is interpreting the data as iso-8859-1 and passing it through the pipe as such. If I take the same data and put it into an xml file as my source but modify the encoding at the top to iso-8859-1, I can duplicate the problem. Thanks, Mike Lopke
Re: javaflow on weblogic 8.1sp2
WHIRLYCOTT wrote: Ok, I will try that. Two more questions: Are you using prefer-web-inf-classes in weblogic.xml? Do you have init-classloader set in web.xml? phil. No to both questions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: decimal formatting
Isn't anybody who knows how I can change the general decimal and thousand seperator in a Cocoon application? How to switch them? I've tried the LocaleAction but this only gives you the locale as a parameter in your sitemap so that no use for decimal formatting Any help is welcome! Regards, Gunter D'Hondt Gunter D'Hondt [EMAIL PROTECTED] 27-01-2005 14:24 Please respond to users@cocoon.apache.org To users@cocoon.apache.org cc Subject decimal formatting Hi, Currenlty I've got a Cocoon pipeline that generates HTML output by using a XSLT transformer where I'm using the following: xsl:value-of select=format-number(round(field), '##,##0.00')/ this all works fine and displays for example 12,345.99 but how can I setup this that it uses my country locale where the decimal separator is a comma and the thousand separator is a point? So the result would be 12.345,99 is there a way to set this for the whole Cocoon application? something like setting the locale for the xslt-transformer? and what with the woody field convertors? for example i've got the following widget declaration: wd:output id=price wd:label/ wd:datatype base=decimal wd:convertor variant=number wd:patterns wd:pattern#0.00/wd:pattern /wd:patterns /wd:convertor /wd:datatype /wd:output Any help is welcome! Regards, Gunter D'Hondt Sofico NV Belgium - 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: Framework for Web application with multi-profile clients
Title: Framework for Web application with multi-profile clients Hello Roberto and all. Thanks for the answer. However - can anybody elaborate a bit ? What tools does cocoon give me in order to answer the difference in the profile of my clients ? Thanks !! Elad Von: Roberto [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 27. Januar 2005 16:53An: users@cocoon.apache.orgBetreff: Re: Framework for Web application with multi-profile clients Hi, definitely you are in the right place with the right product. Cocoon is the right solution for your requirement. Welcome a board Cheers Roberto - Original Message - From: Elad Messing To: users@cocoon.apache.org Sent: Thursday, January 27, 2005 4:46 PM Subject: Framework for Web application with multi-profile clients Hello All I am new here with cocoon. I came here after I got some advices that this is the place where I can find some answers. I am looking for a web-framework that can help me with my requirement of supporting different profile customers. I.E. some of the customers will use PC, some will use PDA like IPAQ and some maybe WAP phones.The resolution is off-course different, the HTML / WML support is different and so on.What do you think ? Can Cocoon answer these requirements ?Thanks !! Elad Messing