Re: from Cforms to Wicket
All the cool people swear by caniuse.com [1] ;-) Another very new resource is the WebPlatform.org site [2] which is in alpha at the moment but is the first collaboration between all the major browser manufacturers to document the browser standards and collate bugs. So to answer Mika's question: HTML5 is already widely supported by browsers. Or to put it another way the HTML5 doctype was designed to be usable without breaking older browsers but also prevent them going into quirks mode. Scripts like modernizr [3], also enable very old browsers (even IE6!) to partially support some of the more desirable CSS3 functions. I don't know about you but 20% of my traffic is mobile based. Whatever forms you do generate it is looking more and more like you also need to support Responsive Web Design which adapts to the browser window size and device input capabilities. We are living in interesting times at the moment from a web perspective and for the past year people have been rushing to 'do responsive' by placing most of the logic client side and making extensive use of media queries. Some people are beginning to wake up to the fact that it might be better to do a little device detection server-side with a technique that Luke Wrobleski coined 'RESS' [4]. This is something for which I think Cocoon might be a good solution. One final thing you may find of interest is a side project of Wicket which I tinkered with a while ago called WicketWebBeans [5]. I have no idea if it is still being developed but essentially it dynamically creates web forms by directly interrogating java beans. You can tailor the behaviour according to your needs. Regards, David Legg [1] http://caniuse.com/ [2] http://www.webplatform.org/ [3] http://modernizr.com/ [4] http://www.lukew.com/ff/entry.asp?1392 [5] http://wicketwebbeans.sourceforge.net/ On 18/02/13 12:24, Francesco Chicchiriccò wrote: On 18/02/2013 13:21, Mika M Lehtonen wrote: Is HTML5 something you can really use already having wide range of browsers supported? (Or at least FF, IE and Chrome) Google says (among others) http://www.findmebyip.com/litmus/
Notes on getting Cocoon 3.0.0-alpha-2 sample app running
Here are some notes I made while trying to get started with the Cocoon 3 alpha 2 sample apps running under Windows XP using Maven. Hopefully it might help others like me starting down the C3 road and serve as a record of the corrections needed to the current documentation ;-) The place to go for documentation on running the sample apps is the Cocoon 3 download page [1]. The simplest way to get the sample app up and runnning is to use Maven to do the heavy lifting. As the documentation mentions under the 'Maven 2 archetypes' heading you have to type the following line to create the sample block: - mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create -DarchetypeGroupId=org.apache.cocoon.archetype-sample -DarchetypeArtifactId=cocoon-archetype-sample -DarchetypeVersion=3.0.0-alpha-2 -DgroupId=com.mycompany -DartifactId=mysample Note: you have to place everything on one line before pasting it into a windows DOS box or else only the first line will get executed. This should proceed correctly and a new directory will appear called 'mysample' which you should change into for the next part. I tried typing 'mvn jetty:run' to execute the sample app but I kept getting a couple of Maven dependency errors: - com.sun.jersey:jersey-core:jar:1.0.3 com.sun.jersey:jersey-server:jar:1.0.3 Never having heard of Jersey[2] before (the new Restful API reference implementation and not the place or the item of clothing!) I looked it up and noticed the dependencies page[3] which led me to add the following to the pom.xml file just below the packaging tag: - repositories repository idmaven2-repository.dev.java.net/id nameJava.net Repository for Maven/name urlhttp://download.java.net/maven/2//url layoutdefault/layout /repository repository idmaven-repository.dev.java.net/id nameJava.net Maven 1 Repository (legacy)/name urlhttp://download.java.net/maven/1/url layoutlegacy/layout /repository /repositories After this I could successfully run the sample app... but only after looking in the correct URL ;-) The documentation[1] gives the wrong one. The Jetty server is set up to actually run at http://localhost: Hope this helps. Regards, David Legg [1] http://cocoon.apache.org/3.0/download.html [2] https://jersey.dev.java.net/ [3] https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.3/jersey/dependencies.html - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Error in documentation of Cocoon forms Union widget
Hi Robby, Thanks for spotting that. It seems you are not the only one that has mentioned it... it was commented on back in December 2005! I have updated the daisy version of this document (http://cocoon.zones.apache.org/daisy/cdocs/g1/g2/g7/forms/widgets/741.html) but it will have to be published before it makes it to the live site. I never have had the courage to do that! Regards, David Legg Robby Pelssers wrote: http://cocoon.apache.org/2.2/blocks/forms/1.0/741_1_1.html has a mistake… Inside the fd:group the fd:widgets tags are missing in this example. fd:field id=testcase fd:datatype base=string/ fd:selection-list fd:item value=case1fd:labelCase 1/fd:label/fd:item fd:item value=case2fd:labelCase 2/fd:label/fd:item /fd:selection-list /fd:field fd:union id=testunion case=testcase fd:widgets fd:group id=case1 fd:field id=field1 fd:datatype base=string/ /fd:field fd:field id=field2 fd:datatype base=string/ /fd:field /fd:group fd:group id=case2 fd:field id=field1 fd:datatype base=long/ /fd:field fd:field id=field2 fd:datatype base=long/ /fd:field /fd:group /fd:widgets /fd:union Cheers, Robby Pelssers - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon.forms is undefined when using submit-on-change=true for Field Widget
Hi, I somehow got it working… not sure if changing the serializer from xhtml to html fixed it though. In my experience, yes. When using the XHTML serializer it seems that the script/ elements in the head are not all recognized as XML elements. Adding some newlines now and then helps fixing this issue. Just for interest you may find my updates to the HTMLSerializer document [1] useful in this regard. I think the script tag is treated differently between XHTML and HTML. [1] http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g2/g4/Serializer/896.html?branch=1language=1 Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: cocoon.forms is undefined when using submit-on-change=true for Field Widget
Hi Robby, @David…Thx for pointing out the differences between those serializers… What is needed to get an account to update the documentation myself? No problem. If you want to contribute to documentation here's what you need to know [1]. Regards, David Legg [1] http://cocoon.apache.org/1273_1_1.html - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Alternative to Javascript + continuations?
Hi Gabriel, we have a huge product based on cocoon 2.1.11 / spring / hibernate and started 5 years ago with the flowscript / continuations aproach. Thanks for that. Every now and then I need a reminder about why Cocoon is worth continuing ;-) Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Starting out with Cocoon 2.2
Hi David, I'm just about to embark on a new project... I'd like to use Cocoon 2.2 for this, but I'm concerned about the apparent lack of support for it. It is true that Cocoon has hit a low point at the moment and I'm sure many of us wonder if it will ever recover. Many of the original contributors have moved on to other things and officially version 2 (and 2.2) are in 'maintenance mode'. Version 3 is still being worked on but to be honest it looks so different that you will be starting again from scratch compared to version 2. It's a great shame as I really thought version 2.2 was beginning to gain traction. Can anyone suggest any resources that will help me get started with Cocoon 2.2? I would archive that book on version 2! It will be of little use to you when working with 2.2. Most of the useful documentation can be found here: - http://cocoon.zones.apache.org/dev-docs/2.2/1159_1_1.html But you should be aware that this is the 'published' version of the documentation. It may be the case that the 'unpublished' versions are more up to date. To get to them you can click on the link at the bottom of the page where it mentions 'Errors and Improvements'. This link will take you to the Daisy CMS which is what Cocoon members use to write and edit documentation before it gets published. Yes!... It is a horrible mess and I have commented about this before but was persuaded it was for the best. I'm concerned that interest in and support for Cocoon is dying out. Would I be better off choosing a completely different technology for my project? I would say think seriously before you commit another year or two of your life to learning it! Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Alternative to Javascript + continuations?
Hi Robby, ...Whereas I used flowscript very heavily in the past, I'm tending towards java based solutions more and more and Cocoon3.0 sounds promising with it's REST-controllers. Out of curiosity, when you say you are using less flowscript and more Java these days what do you replace the flowscript with? I thought one of Cocoon's best contributions to humanity was flowscript together with continuations so I'm curious to learn what you use instead... are you using Apples? Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: how-to query an xml repository efficiently
Hi Robby, I have following use case. The customer has an xml repository which is nothing more then a directory on filesystem which contains subdirectories containing one or more xml files. They now want to query those xml files on some predefined criteria which might change over time… Maybe others with more experience could comment but what about Apache Xindice [1] ?. Not sure what the status is on this project but it was designed from the ground up to be able to store, query and retrieve XML. It may be that everyone abandoned it and started using Solr instead ;-) [1] http://xml.apache.org/xindice/index.html Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: problem with this line?
Hi Paul, In my flowscript, I get an error on this line and I don't know why--the jar file with this package is on the classpath. var encoder = new Packages.org.apache.cocoon.ojb.samples.bean.PasswordEncoder(); Remove the brackets '()' from the end of the line. You want to create a new Object and not call a function. Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: problem with this line?
Don't quote me but I bet the version of the Rhino JavaScript interpreter [1] was upgraded and the new version does a better job of spotting this syntax error. Regards, David Legg [1] http://www.mozilla.org/rhino/ Paul Joseph wrote: Hi David, Thank you for your reply. It works perfectly fine AS IS with Cocoon 2.1.7. Would you know what changed in Cocoon 2.1.11 to make this change needed? thx Paul David Legg wrote: Hi Paul, In my flowscript, I get an error on this line and I don't know why--the jar file with this package is on the classpath. var encoder = new Packages.org.apache.cocoon.ojb.samples.bean.PasswordEncoder(); Remove the brackets '()' from the end of the line. You want to create a new Object and not call a function. Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: problem with this line?
Paul, It occurs to me I might be talking complete gibberish here :-) Unfortunately, I don't have the time to investigate more fully... but you might like to peruse the Rhino paper [1] which discusses how to communicate between Java and Javascript in far more detail. [1] http://www.mozilla.org/rhino/ScriptingJava.html Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Email connector
Hi Peter, In effect it needs to parse the RFC822 headers to get the subject and origin and date, and then reproduce the text-body untouched (replacing and with character entity references), and drop all attachments on the floor. I thought I saw a reference to a component that did this a couple of years ago, but I can't find it again. You may like to take a look at the Mime4j code which is a subproject of the James Apache mail server [1] Regards, David Legg [1] http://james.apache.org/mime4j/index.html - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: AW: AW: [C2.2] Display Upload Progress
Hi Matthias, first, a big THANKS for helping me and at the same time sorry that i destroyed your sample webapp. No problem! what i didn't understand so far is: which instance decides which version of an artifact is the latest? why does maven try to download e.g. cocoon-core:2.2.1 when it's not available/released? If you look for the pom.xml file in the [Cocoon trunk folder]/parent folder you will see the dependency for cocoon-core listed as follows: - dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-core/artifactId version2.2.1-SNAPSHOT/version /dependency As all the other blocks refer to this parent pom file that's where the version number is set. The Cocoon developers could have put the version number in each block's local pom.xml file but in a large project like Cocoon it makes more sense to set the version number in one place only. Maven should only try to download an artifact from a remote repository if it can't find it in your machine's local repository. The reason for the 'mvn install -P allblocks' command is to ensure that all the Cocoon block artifacts get built and then intalled in your local repository. If you are running on windows this is usually located in C:\Documents and Settings\[user name]\.m2\repository\ If you see maven trying to download a cocoon artifact (as opposed to a plugin) from a remote repository it suggests something is wrong. I didn't see that when I built it from scratch though. Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: AW: AW: [C2.2] Display Upload Progress
David Legg wrote: If you look for the pom.xml file in the [Cocoon trunk folder]/parent folder you will see the dependency for cocoon-core listed as follows: - dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-core/artifactId version2.2.1-SNAPSHOT/version /dependency As all the other blocks refer to this parent pom file that's where the version number is set. The Cocoon developers could have put the version number in each block's local pom.xml file but in a large project like Cocoon it makes more sense to set the version number in one place only. Having thought this through some more I realize what I said is not strictly true. The version numbers specified by the pom file in the 'parent' folder sets the version number that all other artifacts that depend on this artifact should ask for. The version number specified in the artifact's local pom file effectively sets the version number of this artifact when it gets built. So to make this clearer if we take the 'cocoon-core' artifact; it's pom.xml file is defined in [cocoon trunk]\core\cocoon-core\pom.xml. It contains a couple of lines as follows: - artifactIdcocoon-core/artifactId version2.2.1-SNAPSHOT/version These effectively set the version number of this artifact when it gets built. However as I showed in my earlier email the pom.xml file in [cocoon trunk]\parent\pom.xml also specifies a version number (hopefully the same one!) and this is the one that other artifacts will look for if they express a dependency on it. I also realized that maybe I should explain a bit more about the difference between the development version of Cocoon and the 'released' version. The development version is obviously managed in a subversion repository. As this is usually in a state of flux it is quite common to set the version numbers defined by some code to end in -SNAPSHOT. This tells maven to check the repository to see if a slightly more up to date version is ready. However, you should never see a version ending in -SNAPSHOT on the public maven repository. In theory when a release is made only non-snapshot versions are copied onto the repository. HTH David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: AW: AW: [C2.2] Display Upload Progress
Hi Matthias, ok, maybe i was too fast. after downloading the trunk mvn can't find some artifacts for cocoon-webapp to be build (e.g. cocoon-core-2.2.1-SNAPSHOT) i specified the following remote repositories: - central (http://repo1.maven.org/maven2) - gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository) - apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository) i tried to manually download the artifacts, but didn't find them My earlier instructions were only an outline ;-) You should go through the 'Building Cocoon 2.2' page [1] first so that you have all the required blocks installed. Then you should be able to run the mvn jetty:run command as I wrote it. HTH David Legg [1] http://cocoon.apache.org/798_1_1.html - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: AW: AW: AW: [C2.2] Display Upload Progress
Hi Benjamin, I found this [1] blog post some time ago and the process described there still works fine for me. [1] http://mrhaki.blogspot.com/2008/09/running-cocoon-22-samples.html I'm pretty sure that when I tried, it failed to build if you skip the tests as mentioned in that blog. The reason is one of the artifacts generated for the tests is actually required by the rest of Cocoon. If I get chance, I'll try building it from fresh to see what the problem is. Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: AW: [C2.2] Display Upload Progress
Hi Matthias, Hi i compiled all the samples as you described. but when i type mvn -P allblocks jetty:run in core/cocoon-webapp i still have the problem with the missing artifacts. don't you have problem that maven wants to download artifacts that doesn't exist in the specified remote repositories? To check what's going on I've rebuilt Cocoon from the latest subversion copy. I deleted my maven repository (to ensure the build process starts from scratch). I updated my subversion copy of Cocoon. I ran 'mvn clean' Here I ran into a few error messages. Not sure why it would need a plugin in order to cleanup a few files: - ... from the specified remote repositories: central (http://repo1.maven.org/maven2) org.apache.cocoon:cocoon-maven-plugin:maven-plugin:1.0.0-RC1-SNAPSHOT I ignored this and then executed the main build command: - mvn install -P allblocks After a very long time and lots of messages and tests it built successfully: - [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 36 minutes 54 seconds [INFO] Finished at: Mon Jan 19 16:00:33 GMT 2009 [INFO] Final Memory: 134M/240M [INFO] D:\projects\cocoon\cocoontrunk Now for the moment of truth... to run the webapp! cd core\cocoon-webapp mvn jetty:run Uh oh! It runs jetty but only after spewing out loads of errors about bean configuration. I've attached the messages to this email. If I persevere and try accessing the sample webapp it not unexpectedly returns error 503 (Service unavailable). So... *I guess the answer is the subversion trunk is currently broken*... which is unfortunate for me because now I cannot run the examples either :-( I was using Maven version 2.0.9 which is the bare minimum you need to build Cocoon. As for accessing those other repositories I had no problem (even though I think it is probably time to remove the dependency on some things from Grek's personal site!). Actually, if you look in the 'parent' folder you will see these other repositories listed in the pom.xml: - repositories repository idcentral/id nameMaven central repository/name urlhttp://repo1.maven.org/maven2/url releases enabledtrue/enabled !-- only look for jars here when they are not present locally -- updatePolicynever/updatePolicy /releases snapshots enabledfalse/enabled /snapshots /repository !-- This is temporary repository -- repository idgkossakowski-maven2/id namegkossakowski-maven2/name urlhttp://people.apache.org/~gkossakowski/maven2/repository/url /repository /repositories Regards, David Legg INFO [main] (DefaultListableBeanFactory.java:467) - Overriding bean definition for bean 'org.apache.cocoon.caching.Even tRegistry': replacing [Generic bean: class [org.apache.cocoon.caching.impl.StoreEventRegistryImpl]; scope=singleton; abs tract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=n ull; factoryMethodName=null; initMethodName=initialize; destroyMethodName=null; defined in URL [jar:file:/D:/projects/co coon/cocoontrunk/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-eventcache-impl-1.0.0-SNAPSHOT.jar!/META-INF /cocoon/spring/cocoon-eventcache.xml]] with [Root bean: class [org.apache.cocoon.caching.impl.StoreEventRegistryImpl]; s cope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false ; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] ERROR [main] (ContextLoader.java:215) - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Unable to read Avalon configuration from 'resource://org /apache/cocoon/cocoon.xconf'.; nested exception is org.apache.avalon.framework.configuration.ConfigurationException: Una ble to create class for component with role org.apache.cocoon.caching.impl.JMSEventMessageListener with class: org.apach e.cocoon.caching.impl.JMSEventMessageListener at org.apache.cocoon.core.container.spring.avalon.BridgeElementParser.parse(BridgeElementParser.java:86) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDel egate.java:1255) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDel egate.java:1245) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDef initionDocumentReader.java:135) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions
Re: Cocoon 2.1.8 Forms + AJAX : Final call for help!
That's a shame... all your links require a username and password to get in... :-( Hi, have a look at : * http://svn.bluexml.com/svn/bluexml/org/erp/trunk/ * http://svn.bluexml.com/svn/bluexml/org/erp/trunk/blocks/core/common/webapp/resources/forms/ and more specifically at * http://svn.bluexml.com/svn/bluexml/org/erp/trunk/blocks/core/common/webapp/resources/forms/xsl Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: C2.2 - Where is bu.js? (AJAX related)
That suggests to me that, even though I'm sure the BrowserUpdateTransformer is listed in my pipeline, it isn't working yet. I'll experiment. As you suspected, it turns out the BrowserUpdateTransformer was *not* being called as it was in the wrong pipeline! Thanks for the hint. So, now I've moved on to being able to display the form correctly with no exceptions but no Ajax based updates are occurring either. When I run the Cocoon suggestion list demo in Firefox using Firebug I can see the following requests everytime I press another key in the suggestion field: http://localhost:/samples/forms/_cocoon/forms/suggest?widget=personIdcontinuation-id=16818d627c615b3238016c56685f5250641b6b61filter=16phase=init However, my test application isn't doing this so I suspect there is something else I need to enable first. Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
C2.2 - Where is bu.js? (AJAX related)
I'm getting myself into a terrible mess trying to make a simple suggestion list using CFORMS and Ajax. I've no problem with the cocoon-webapp samples... they run fine. The problem arises in knowing which bits of the samples to extract to make a single stand-alone app. Perhaps I approached this process the wrong way around but I thought I'd start with a brand new Cocoon block fresh from running maven and build it up from that. I'm now getting a version of my form appearing in a browser but instead of a list of autocompleting names I get a plain textbox with an index number in it and a long exception list gets generated. The upshot of the exception list is a couple of missing pipeline matchers: - .. Caused by: org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: resource/external/bu/manifest.js .. javax.servlet.ServletException: org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: resource/external/bu.js .. I've searched the entire cocoon trunk but can't find bu.js anywhere... I presume it is short for 'browser update' but where is this file located? Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: C2.2 - Where is bu.js? (AJAX related)
Hi Benjamin, Solution is to make sure you use the browser-update transformer correctly. Let me know if I am right. Thanks for the explanations. That makes a lot more sense. If I look at the source of the generated page it still has tags like: bu:replace id=name surrounding the various fields. That suggests to me that, even though I'm sure the BrowserUpdateTransformer is listed in my pipeline, it isn't working yet. I'll experiment. Regards, David Legg - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Java for generating suggestion-list
In searching for information on how to use Java generated data as a *suggestion* list in a CFORM multivaluefield I came across the 3 month old email thread below. I am interested in using this... did it get resolved? Regards, David Legg Jeroen Reijn wrote: Ah.. I must have been still a sleep. I'll try to have a look today as well. The suggestion list has the ability for an attribute type='java', but the flowscript part I have no idea yet. Reijn Gabriel Gruber wrote: Hmm, thanx for your quick replies. however you are referring to the selection-list while I would like to use the new suggestion-list. an example is provided within the latest cocoon cforms samples, but the suggestion-list is created via javascript (which is very hard to debug). so my question is: is there a way to do that in java? fd:field id=personId fd:datatype base=integer/ fd:initial-value16/fd:initial-value fd:suggestion-list type=javascript ![CDATA[ function addSuggestion(bean) { suggestions.push({value: bean.value, label: bean.label}); } function personList() { return [ {value: 1, label: Donald Ball}, {value: 2, label: Sylvain Wallez}, {value: 3, label: Carsten Ziegeler}, {value: 4, label: Torsten Curdt}, {value: 5, label: Marcus Crafter}, {value: 6, label: Ovidiu Predescu}, {value: 7, label: Christian Haul}, {value: 8, label: Jeremy Quinn}, {value: 9, label: Stefano Mazzocchi}, {value: 10, label: Pierpaolo Fumagalli}, {value: 11, label: Davanum Srinivas}, {value: 12, label: Antonio Gallardo}, {value: 13, label: Ugo Cei}, {value: 14, label: David Crossley}, {value: 15, label: Bertrand Delacr#233;taz}, {value: 16, label: Bruno Dumon}, {value: 17, label: Daniel Fagerstrom}, {value: 18, label: Leszek Gawron}, {value: 19, label: Ralph Goers}, {value: 20, label: Vadim Gritsenko}, {value: 21, label: Jorg Heymans}, {value: 22, label: J#246;rg Heinicke}, {value: 23, label: Jean-Baptiste Quenot} ]; } function startsWith(string1, string2) { return (new java.lang.String(string1)).startsWith(string2); } function searchByString() { for (var i = 0; i list.length; i++) { if (startsWith(list[i].label, filter)) { addSuggestion(list[i]); } } } function searchById() { for (var i = 0; i list.length; i++) { if (list[i].value == parseInt(filter)) { addSuggestion(list[i]); } } } var suggestions = []; var list = personList(); if (filter) { var phase = cocoon.request.getParameter(phase); if (phase phase.equals(init)) { if (!isNaN(parseInt(filter))) { searchById(); } else { cocoon.log.error(The filter: ' + filter + ' must be a number.); } } else { searchByString(); } } else { suggestions = list; } return suggestions; ]] /fd:suggestion-list /fd:field thanx for you help gabriel Gabriel Gruber wrote: Hello! I was just wondering, if it is possible to use java instead of javascript to generate a suggestion-list for a cforms widget. this java aims to query a database (via hibernate) and should return a list of results. something like this... fd:field id=person fd:datatype base=string/ fd:suggestion-list type=java src=com.mycompany.SuggestionListHandler/ /fd:field any ideas? from looking in the api i couldn't find a way for this to work. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Serialize with type html removes input tags, why? How to fix?
Hi Smigge, There is a little more detailed account of how the default HTML serializer works here: - http://cocoon.zones.apache.org/daisy/documentation/components/1059/g1/896.html Both Jasha and I don't know what you mean when you say it drops stuff. Do you mean it completely removes the whole 'input' tag or somehow munges the attributes? If it's the latter then it may be something to do with how the default HTML serializer treats boolean attributes. For example, option selected=selected is output as option selected. Regards, David Legg Smigge wrote: Hi! I'm serializing an html document, but for some reason it drops stuff like this: input type=checkbox checked=yes name=what value=something/ Why? - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: How to force a Save As prompt?
Derek, Please add the reference/link for why URLs in Cocoon should not have an extension - I know its required, but why is it bad? It's not specific to Cocoon. I only mentioned that because Cocoon's sitemap makes it particularly easy to map a URL without an extension to some content. So in general, it is not a good idea to include extensions in a URL if you want that URL to be useful for a long time to come. The extension may contain implementation specific details which may not always be true. It's generally considered better to publish a generic URL and then let the browser use content negotiation to determine whether it can accept that content. For example, what if your organization regularly published an important document as a Microsoft Word file (*.doc) and published it on your site with a URL of: http://myorg.org/importantdocs/thisweek.doc That's great and you would probably bookmark it and everything would be fine... until your organization decided to move with the times and publish it as a styled xml document. Now you have a dilemma... do you change the url so it contains a .xml extension and risk losing your loyal followers (whose bookmarks no longer work) or do you keep the same url which ends in .doc but is actually an xml file? A great resource for all this is the W3C's own Cool URIs [1] page. There are a lot of other url advocates out there like this one [2]. I suppose though, if you are talking about downloads this might all be a bit academic. After all if you want to download an executable file the chances are it will remain in the same format forever... but you should at least spend half a second thinking about the format of the URL you expose it with. Regards, David Legg [1] http://www.w3.org/Provider/Style/URI#remove [2] http://blog.welldesignedurls.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
Derek, Before getting into detail, I'd like to say that I do agree in principle with what you said below. Oh Good! I was worried for a moment when I saw the size of your response ;-) My real issue probably lies in the fact that I have been around computers too long. Ah yes... I remember building my own bi-stable flip flop circuits! PS The answer to your question of Microsoft Word file is - neither!The existing URL (poor though it might be) is still a valid one and should be kept. Ok. I was thinking off the top of my head. A better example might be publishing a page with a URL of 'today.asp' or 'today.jsp'. The extension here is irrelevant and simply overcomplicates the URL for the poor humans that might have to type it in or remember it. I see URLs in a more semantic way now after following the workings of the semantic web crowd. Another simple example occurs with images. We don't really need to note the fact that an image is in gif format by stating that in a URL. Times change and it may be that for legal reasons you can no longer use GIF format at all on your site and you have to use PNG instead. So all those URL references to mylogo.gif have now got to change. Whereas if you had supplied a url of /images/mylogo the change would be invisible and the URL could remain unchanged. I think I'll stop now... I might catch the zealot bug ;-) Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
Mmmm... Does anyone still care about IE4 - the stats from different sites suggest not: By chance I came across another item [1] which seems to suggest that perhaps the problem is not exclusive to IE4. Maybe IE5 and IE6 are involved too. The article gets a few developers worked up after the beginning. My reading of it seems to imply that mime-sniffing takes place if IE can't work out the mime-type from the url. So if your url ends in .html you are ok, but if it ends in no extension (something which is considered good practice in Cocoon) it will sniff the file content and use that to decide what to do with the downloaded file. It would be interesting to know if anyone else has come across this issue with IE7. Regards, David Legg [1] http://blogs.msdn.com/ie/archive/2005/02/01/364581.aspx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
is there a way or workaround how i can force a Save As prompt for my cocoon output? The problem is that the browser knows the mime types of the generated files (xml, pdfs) and displays it instead of prompting. See http://markmail.org/message/jgcetksksgmpfk2c#query:cocoon%20content%20disposition%20header+page:1+mid:dt2547iguthv34dg+state:results (Content disposition header) Ah! this all brings back some memories. This article summarizes what you need nicely [1] Just for reference, I presume you don't care about IE4? The technique of setting the content-disposition header doesn't work for that browser because even if you used the content-disposition header it still sniffed the file you were downloading and acted on what it found there rather than what you told it [2]. Regards, David Legg [1] http://support.microsoft.com/kb/260519 [2] http://support.microsoft.com/kb/182315/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Floating button in CForms
Hi Paul, Hey David, Thanks for your suggestions. I took a different tack though--used javascript--and this library: http://www.openjs.com/scripts/events/keyboard_shortcuts/ Glad you found a solution... and hopefully it doesn't impede accessibility ;-) Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: overwrite block's properties with an external .properties-file
Hi Benjamin, Benjamin Boksa wrote: I have created a simple ConfigReader which implements PropertyProvider and the properties are read fine - however they are overwritten by the block's properties :-( How do I configure Cocoon to use default properties from whithin a block which can be overwritten by a file on the file system? Did you get any further with this? I think I have run into a similar problem. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [C2.2] Overriding default properties? - SOLVED
I wrote: I'm a little confused about the best way to change or override default settings for properties in Cocoon 2.2. I'm less confused now ;-) Out of the box the 'html' serializer is set to produce Transitional 4.01 HTML. So if I put the following in sitemap.xmap: ... map:serialize type=html/ ... then that's what I get. Now if I try overriding the defaults by explicitly adding extra parameters to the sitemap as follows: ... map:serialize type=html doctype-public-//W3C//DTD HTML 4.01//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/strict.dtd/doctype-system /map:serialize ... I get no change in the output. Is this because the spring beans which define the default settings have a higher priority than the sitemap? I realize now that doing things this way is the 'old' or pre-cocoon 2.2 way and I must empty my head of such thoughts! As an experiment I located the following file: [cocoontrunk]/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.xml which I believe to be the file responsible for setting the default properties of the 'xml', 'html' and 'xhtml' serializers as well as some others. I then copied this file to my own block here: [myblock]/src/main/resources/META-INF/cocoon/spring/serializers.xml I then edited this file to remove all the other bean definitions except the one with the name: 'org.apache.cocoon.serialization.Serializer/html'. I also changed the doctype-public and doctype-system to the HTML 4.01 strict definition. After restarting my C2.2 application I was pleased to see that the pipeline which had been outputting 4.01 loose doctype was now outputting 4.01 strict HTML as required. So it works! I have successfully overridden the default config for a Cocoon component without having to resort to the sitemap.xmap file. Having read other user's comments on this I can see how useful this is. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[C2.2] Overriding default properties?
I'm a little confused about the best way to change or override default settings for properties in Cocoon 2.2. Out of the box the 'html' serializer is set to produce Transitional 4.01 HTML. So if I put the following in sitemap.xmap: ... map:serialize type=html/ ... then that's what I get. Now if I try overriding the defaults by explicitly adding extra parameters to the sitemap as follows: ... map:serialize type=html doctype-public-//W3C//DTD HTML 4.01//EN/doctype-public doctype-systemhttp://www.w3.org/TR/html4/strict.dtd/doctype-system /map:serialize ... I get no change in the output. Is this because the spring beans which define the default settings have a higher priority than the sitemap? I've looked at the Block directory structure documentation [1] and get the feeling that that page is trying to tell me something about the order of priority that a property has depending on which directory it is defined in... but am I right? and what is the order? If I explicitly define my own spring bean and place it in [block]/src/main/resources/META-INF/cocoon/spring/something.xml and refer to this bean from the sitemap then all is well and the properties get set. It seems to me that the priorities are a little askew. I would have thought the local sitemap settings should have more sway than the Cocoon defaults stored as beans in another block somewhere? Regards, David Legg [1] http://cocoon.apache.org/2.2/core-modules/core/2.2/1263_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon svn server is down
After looking at the continuum build errors this morning I notice the cause is the lack of a svn repository! http://svn.apache.org is not responding to requests (although you can ping it). Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon svn server is down
Thanks Reinhard, it is back. Thanks for the status page url too. According to a mail on [EMAIL PROTECTED], SVN is up again. http://monitoring.apache.org/status/ David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error building a form with CForms
Hi Yosauron, It looks like you have several issues to fix. Your error report seems to show the javascript file was expected in two different places: - No pipeline matched request: resource/external/jx/manifest.js No pipeline matched request: resource/external/ft/manifest.js What URL did you type in to your browser to get that error report? What's the path of your sitemap file? I'm working on the assumption that perhaps you edited the wrong sitemap :-) David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Hi Yosauron, finally, in other machine and in other place (without proxy) I could build sucessfully Cocoon!!! Glad to hear you now have a way to build it. Proxies can be very useful for lots of reasons... but they can also be infuriating too! Actually, I did pick up on this list that there may be a problem with the Maven archetype plugin when it comes to downloading an archetype catalog through a proxy [1]. So even if you did manage to solve your initial proxy problem there might be another one waiting for you after that. Glad your mental health is better :-) Regards, David Legg [1] http://jira.codehaus.org/browse/ARCHETYPE-202 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error reading archetype catalog http://cocoon.apache.org
Hi lswa, I can't execute Your first Cocoon application using Maven 2. Error occur during execution: mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org I'm not sure, but there may have been a glitch on the Cocoon web site... when I looked at the home page it looked different for a few minutes. Anyhow, when you give that command to Maven it is supposed to find the catalog at http://cocoon.apache.org/archetype-catalog.xml and I've just checked it and it is ok at the moment. Check that you can see this file yourself. If you can't then that would be a problem. Alternatively, if you just type mvn archetype:generate without the -D option it should use the default maven archetype catalog where you should find Cocoon archetypes listed around entry 42 to 44 in the list. The reason we give you the -D option is for convenience so that new users aren't so scared of the long list of archetype possibilities! Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cforms + javaflow + sitemap problem
Hi Maria, I'm very rusty on XSLT I'm afraid Here is the file main.xsl: ... xsl:template match=@*|node() priority=-1xsl:copyxsl:apply-templates select=@*|node()//xsl:copy/xsl:template ... What is the purpose of this line? What happens if you remove it? David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
yosauron wrote: I can't determine which is my problem... I've tried all the solutions of this thread and the tests errors are still there :'(. I'm crazy.. Sorry I can't think of anything else... except maybe try the machine from another (non-proxied) internet connection if you have access to one. Hope you don't stay crazy for too long ;-) David. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Hi Yosauron, I've updated to rev. 690861 and I've still gotten the same tests errors. Could anyone help me? Which revision do i have to download to compile cocoon successfully? I can confirm that on my windows XP system I updated my copy of the Cocoontrunk to revision 691183 (the latest version) and then ran: mvn install -P allblocks 23 minutes and 21 seconds later it had built everything with no failures. I think you will have more success if you use subversion to get the latest release and try again. The revision you quoted is about 300 revisions old. At the beginning of this email thread we quickly established that trying to build without running the tests causes a problem. This is why I used the command above to build it (build.sh does something similar inside but only if you give it the 'build' parameter) . Don't try disabling the tests with the maven.test.skip flag. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
I'm behind a proxy, could be this the source of the problem Is this new info that you omitted to tell us?!!! ;-) I'm not a subversion expert and I'm not personally behind a proxy here but I did notice that you have to make some adjustments if you are behind a proxy. See here [1] for more info. I hope this helps! Regards, David Legg [1] http://subversion.tigris.org/faq.html#proxy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Hi Martin, I think that the subversion checkout works well, but maven is the problem. I think your right. Tak, probably avoided problems with svn because he was using https protocol which might have been allowed by the proxy. Maybe you should try the following: Correctly configure maven to use the proxy. Then try this command: mvn -Dmaven.test.skip=true clean package install My only comment here would be to avoid skipping the tests full stop... at least for the first time. Grek and I discovered that cocoon-pipeline-components depends on cocoon-pipeline-impl:test-jar but test-jar only gets built as part of the test phase. David Legg. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Tak, Cocoon is a big project. Not all people need all features. For the newbies, we can always go back to the old tag that we know, and use that version. Could that be a solution? That's not the issue. One of the reasons for making Cocoon 2.2 the way it is is to allow people to only add the features (read Blocks) they require. So for example, in your case you wanted to use CForms and that's why you had to add the cocoon forms block to your list of dependencies. David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Yosauron, I can confirm that on my windows XP system I updated my copy of the Cocoontrunk to revision 691183 (the latest version) and then ran: mvn install -P allblocks 23 minutes and 21 seconds later it had built everything with no failures. I've followed these step: % rm -R ~/.m2 % svn checkout https://svn.apache.org/repos/asf/cocoon/[EMAIL PROTECTED] cocoon-2.2.0-691183 % cd cocoon-2.2.0-691183 % mvn install -P allblocks And I got the same tests errors :S. I'm behind a proxy, could be this the source of the problem? Just to be sure I've also tried your steps on my Ubuntu server (despite the pain of having to upgrade maven to 2.0.9 from 2.0.8 because Cocoon refuses to build under the old version and the apt-get update command doesn't know about 2.0.9 yet!). This time it only took 18 mins 34 seconds to build successfully. So the conclusion I make is that the repository version is currently ok and maybe the problem you are having is down to your proxy or some other reason. Ubuntu version 8.04 (hardy) The Java version used was 1.6.0_03-b05 from Sun The svn client was version 1.4.6 from CollabNet David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OFF TOPIC] Reinhard Poetz' blog?
It's working for me. David Legg Derek Hohls wrote: Anyone know what is happening with/at this website: http://www.indoqa.com/ I keep getting a 502 proxy error... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: floating button in CForms
Hi Paul, Do you mean that the position:fixed style will keep the button fixed in the visible browser pane, regardless of me scrolling? Yes that's correct. Actually, there's probably no need to buy the book I mentioned. After I wrote that email I typed position:fixed into Google and was surprised how many examples and tutorials came up ;-) These look interesting... http://annevankesteren.nl/test/examples/ie/position-fixed.html http://www.howtocreate.co.uk/fixedPosition.html http://www.cssplay.co.uk/layouts/fixed.html Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Announce] Apache Lenya 2.0.2 released
Hi Ken, The insect has emerged from its cocoon, lived its life, and is now preserved in amber as a thing of beauty, a little jewel. That's very poetic... I tend to visualize it more like a tin can filled with worms ;-) David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: floating button in CForms
Hi Paul, I have a Lg CForm and the client would like the Save button to float so that it is always visible? I should think your best bet would be to use a CSS stylesheet to fix the position of the save button. You could treat the save button like the contents of a fixed footer at the bottom of the page. I'd suggest looking up the 'position:fixed' style. Be warned though that IE 5 and friends doesn't support this, so a work-around has to be done for those. I'd recommend the sitepoint book: 'The CSS Anthology: 101 Essential Tips, Tricks Hacks' [1] by Rachel Andrew if you are looking for ready made examples. [I'm not affiliated to this book in any way!]. Another approach might be to break up the form into smaller groups and only show one group at a time. An example can be found in the Multi-page wizard demo [2] Hope that helps. David Legg [1] http://www.sitepoint.com/books/cssant2/ [2] http://cocoon.zones.apache.org/demos/release/samples/blocks/forms/do-multipage.flow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cforms + javaflow + sitemap problem
Мария Григорьева wrote: map:match pattern=*/* map:aggregate element=content map:part src=index.xml/ map:part src=cocoon:/main/{1}/{2} element=main/ /map:aggregate map:transform src=styles/main.xsl/ map:serialize type=html/ /map:match …….. map:match pattern=main/experiments/*.do map:call function={1}/ /map:match map:match pattern=main/form-template/* map:generate type=jx src=form-template/{1}.xml/ map:transform src=styles/input-forms.xsl/ map:serialize/ /map:match .. In my flowscript : sendPage(form-template/experiment-template, new VarMap().add(experiment, results)); But at the output - I have double-header part! (The part map:part src=index.xml/ from the sitemap) I’ve have had this problem with the flowscript with the redirect function. So, I decide it with the help of param “false” --- redirect(“url”, false); Help please!!! It looks like your route takes you through two separate stylesheets (styles/main.xsl and styles/input-forms.xsl). Is it possible both these stylesheets add a header? Or perhaps, index.xml contains a header? Without more info it's difficult to tell. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cforms
Hi Tak, How should I install Cforms block into getting-strat-app environment? Should I generate myBlock3 and copy cocoon-cforms-impl-1.1.0.jar (unzipped from the cform .zip file) into some directory and link all three blocks together? There is a tutorial on the Cocoon website showing how to add a Cocoon form under Cocoon 2.2 [1]. It may be a tiny bit out of date but it should tell you what you want to know. Just to recap; a Cocoon Block is nothing more than a jar file containing files in a certain expected directory structure. When you come to build a Cocoon application all you are doing is mixing the pre-built Cocoon Blocks that go with a certain release of Cocoon together with your own Cocoon blocks that get generated from your project's source and resource files. There is no need to create 'myBlock3' as that has effectively already been done for you... that is what the cocoon-forms-impl jar file is. All you have to do is tell Maven that your project depends on this jar by adding it to the dependency list in the pom.xml file and Maven will download it and install it into its own local repository ready to be added to the class path when you run your app. Hope that makes it clearer. Regards, David Legg [1] http://cocoon.apache.org/2.2/blocks/forms/1.0/478_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 - Cannot remove jar files from classpath using Maven
Reinhard Pötz wrote: I'm sorry, I forgot to respond earlier. Find my comments inline. No problem, thanks for responding. I don't understand... if the wrapper web application depends on commons-logging and makes arrangements to load the commons-logging jar into the classpath it should clash when I attempt to load the jcl-over-slf4j jar file not necessarily, though I'm not sure what exactly is happening. My guess: When the reloading classloader is used, most of the libraries are loaded by a separate classloader (- the reloading classloader) than the context classloader. The context classloader only loads the libraries that are necessary to use the reloading classloader itself. I suspect you're right. For the moment at least, I now have slf4j working and am using LogBack in all new code. I was a little worried that it was just luck that the classloader decided to use the 'correct' jar file. I thought maybe the loading order might change with the addition of new code at any time and randomly stop the app working... but I'm happier that that won't happen now. Thanks again for pointing out the 'mvn dependency:tree' command... that's a very useful one to know. I'm feeling a lot more comfortable using Maven now that I've read up on exclusions and transitive dependencies. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java bean puzzle. using ecliplse plugin or not.
Hi Grek, Unfortunately, it's not fixed in trunk. Take a look at the history of this file[1] and you will see that is has not changed for more than a year now. The problem we see here is that archetype plug-in for Maven tries to find all expressions in files that it creates... Unfortunately, #{message} is treated as an expression too but it shouldn't. It's [not] aimed at archetype plug-in but Cocoon's template generator. According to this[2] page (archetype uses velocity) the fix should be easy: we need to escape # character using \# and everything should work just fine... Aha! Well spotted ;-) I'll try to fix this issue ASAP. Thanks. As this is may be someone's very first close encounter with Cocoon 2.2 we want to set a good example. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java bean puzzle. using ecliplse plugin or not.
Hi Ken, It depends which way I do things, but I am still having problems with 'Your first Cocoon 2.2 Application' because the Java Bean doesn't work. Can anyone explain this behaviour, in terms that a non-java-speaker might understand? I think the problem is that the 'src/main/resources/COB-INF/demo/spring-bean.jx.xml' file contains an old version of the JX syntax for getting hold of a javabean's property. Try editing the file so that instead of: - spring#message/spring It should say this: - spring#{message}/spring Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet URLs in the XSL template
Hi Peter, I'm getting an error unknown protocol: serlvet. I'm hoping you did a cut 'n' paste in your email and the problem is simply a typo servlet and not serlvet ? David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java bean puzzle. using ecliplse plugin or not.
Ken, Thankyou very much, David. I can confirm that the spring-bean now does work properly. Thanks for confirming that. How do we report this to the developers? Normally, you would open a new item in the bugs database (called JIRA) [1]. However, I've just looked at the latest version of that file in the SVN repository and it looks like it is fixed already. I think it is in the 'trunk' at this location: - [svn trunk]\tools\archetypes\cocoon-22-archetype-block\src\main\resources\archetype-resources\src\main\resources\COB-INF\demo\spring-bean.jx.xml The code looks like this: - demo module${groupId}:${artifactId}/module spring#{message}/spring /demo I suspect though that getting this change incorporated into the wide world is a little more involved than just issuing a new release of Cocoon because someone has to upload the new version to the official maven site I think. Anyhow... the main thing is it has been covered and at some point the corrected version will be available. In the meantime we can sit back; smug in the knowledge that we know the answer ;-) Regards, David Legg [1] https://issues.apache.org/jira/browse/COCOON - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 - Cannot remove jar files from classpath using Maven
Hi Patrick, Just for getting it clear - is 'myblock' some block, or are you listing dependencies for the whole web-application, since there could be a dep on commons-logging wich is not mentioned out of 'myblock' I realised my message was a bit ambiguous after I sent it. To be clear, 'myblock', is *exactly* the same as 'myBlock1' in the tutorial [1]. All I did to get the dependency tree listing was to add some exclusion tags to the myblock/pom.xml file to exclude commons-logging and log4j jar files from all of the dependencies listed in the pom. The reason I'm flagellating myself like this is because I need to effectively replace these two jar files with some slf4j equivalents that redirect log messages created using legacy (commons-logging and log4j) code to the slf4j logging framework. Since that message and thanks to the hint about 'mvn dependency:tree' from Reinhard I've realized that only cocoon-core has a dependency on those two jar files. I updated pom.xml to only have the exclusion tags on cocoon-core and now the dependency tree shows no reference to the two jar files I wanted to be excluded. This is great!... but my quest to use slf4j as my logging solution is still not fulfilled. The question now is why when I run 'mvn package' or 'mvn jetty:run' when in the myblock directory does maven insist on placing the commons-logging and log4j jar files into WEB-INF/lib even though I've expressly excluded them? Maybe the answer has something to do with the cocoon-maven-plugin? Also, since my last message, I came across the Shielded Classloader [2] which explicitly mentions the problem of using your own logging framework and how the shielded classloader may help. I'm hoping that once I have these issues sorted out I'll write it up to help others travelling this route for the first time. Regards, David Legg [1] http://cocoon.apache.org/2.2/1159_1_1.html [2] http://cocoon.apache.org/2.2/maven-plugins/maven-plugin/1.0/1262_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 - Cannot remove jar files from classpath using Maven
This is great!... but my quest to use slf4j as my logging solution is still not fulfilled. The question now is why when I run 'mvn package' or 'mvn jetty:run' when in the myblock directory does maven insist on placing the commons-logging and log4j jar files into WEB-INF/lib even though I've expressly excluded them? What WEB-INF/lib directory are you referring to? Is it ./target/rcl/webapp/WEB-INF/lib or is it the WEB-INF/lib directory of the web application Maven module? If it is the first, the answer is that the wrapper web application (a minimal web application that wraps a block) uses the reloading classloader (commons-jci.jar) which has a dependency on commons-logging. It is the first. I don't understand... if the wrapper web application depends on commons-logging and makes arrangements to load the commons-logging jar into the classpath it should clash when I attempt to load the jcl-over-slf4j jar file which is supposed to replace the classes in commons-logging so that messages get forwarded to the slf4j logging framework... but they don't! If I change the dependencies section of myblock/pom.xml to the following, then when I run mvn jetty:run I get bucketloads of debug messages on my console... which I think means SLF4J is working... or maybe I'm deceiving myself! dependencies dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-core/artifactId version2.2.0/version exclusions exclusion groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId /exclusion exclusion groupIdlog4j/groupId artifactIdlog4j/artifactId /exclusion /exclusions /dependency dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-servlet-service-components/artifactId version1.0.0/version /dependency dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-template-impl/artifactId version1.1.0/version /dependency dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-flowscript-impl/artifactId version1.0.0/version /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.4/version scopeprovided/scope /dependency !-- Logging related dependencies -- dependency groupIdorg.slf4j/groupId artifactIdjcl-over-slf4j/artifactId version1.5.2/version /dependency dependency groupIdorg.slf4j/groupId artifactIdlog4j-over-slf4j/artifactId version1.5.2/version /dependency dependency groupIdorg.slf4j/groupId artifactIdslf4j-api/artifactId version1.5.2/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.9/version /dependency /dependencies Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java bean puzzle. using ecliplse plugin or not.
Anyone else see this too? I've tried both approaches and have the same results. Yes I see it too. I haven't looked too closely at the cause yet. David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
C2.2 - Cannot remove jar files from classpath using Maven
In order to use another logging package I need to ensure commons-logging and log4j jar files are not in the class path. I cannot get Maven to exclude them. I'm using Maven 2.0.9. Here's the scenario: - Following the Cocoon tutorial [1] I created a Cocoon block called 'myblock' (number 2 on the list of archetypes) If I change into the 'myblock' folder and run 'mvn package' I notice the following lines in the output: - ... [INFO] [cocoon:prepare {execution: prepare}] [INFO] Preparing a Cocoon web application. [INFO] Deploying string-template to WEB-INF/log4j.xml [INFO] Adding lib to WEB-INF/lib: commons-logging:commons-logging:1.1:jar [INFO] Adding lib to WEB-INF/lib: org.apache.commons:commons-jci-core:1.0:jar [INFO] Adding lib to WEB-INF/lib: commons-io:commons-io:1.3.1:jar [INFO] Adding lib to WEB-INF/lib: log4j:log4j:1.2.14:jar ... That means those jar files will be in the classpath when the web app is run. So, then I edit the myblock/pom.xml file and add 'exclusion' tags to all the dependencies I can see like this: - project ... dependencies dependency groupIdorg.apache.cocoon/groupId artifactIdcocoon-core/artifactId version2.2.0/version exclusions exclusion groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId /exclusion /exclusions /dependency ... /dependencies ... /project When I run 'mvn clean package' I get exactly the same results! When I use the mvn -X parameter to see the debug output as maven runs I get the impression that the maven plugins seem to be adding dependencies to the dependency tree: - ... [DEBUG] Retrieving parent-POM: org.apache.cocoon:cocoon::6 for project: null:cocoon-tools-modules:pom:6 from the repository. [DEBUG] Adding managed dependencies for unknown:cocoon-maven-plugin ... [DEBUG] commons-logging:commons-logging:jar:1.1 ... I suppose I could start fiddling with plugin exclusions but this is getting silly. Do I really have to work this hard to try to make sure a jar file isn't included in the classpath? Regards, David Legg [1] http://cocoon.apache.org/2.2/1159_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 - Cannot remove jar files from classpath using Maven
Thanks again Reinhard, I ran 'mvn dependency:tree' from the 'myblock' folder and got the following: - [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'dependency'. [INFO] [INFO] Building myblock [INFO]task-segment: [dependency:tree] [INFO] [INFO] [dependency:tree] [INFO] com.mycompany:myblock:jar:1.0.0 [INFO] +- org.apache.cocoon:cocoon-core:jar:2.2.0:compile [INFO] | +- org.apache.cocoon:cocoon-spring-configurator:jar:1.0.2:compile [INFO] | | +- org.springframework:spring-core:jar:2.5.1:compile [INFO] | | +- org.springframework:spring-context:jar:2.5.1:compile [INFO] | | | \- aopalliance:aopalliance:jar:1.0:compile [INFO] | | +- org.springframework:spring-beans:jar:2.5.1:compile [INFO] | | +- org.springframework:spring-aop:jar:2.5.1:compile [INFO] | | \- org.springframework:spring-web:jar:2.5.1:compile [INFO] | +- org.apache.cocoon:cocoon-configuration-api:jar:1.0.2:compile [INFO] | +- org.apache.cocoon:cocoon-pipeline-components:jar:1.0.0:compile [INFO] | | +- org.apache.cocoon:cocoon-pipeline-impl:jar:1.0.0:compile [INFO] | | | +- org.apache.cocoon:cocoon-pipeline-api:jar:1.0.0:compile [INFO] | | | | \- org.apache.excalibur.components:excalibur-xmlutil:jar:2.2.1:compile [INFO] | | | +- org.apache.excalibur.containerkit:excalibur-instrument-api:jar:2.2.1:compile [INFO] | | | \- jakarta-regexp:jakarta-regexp:jar:1.4:compile [INFO] | | +- org.apache.cocoon:cocoon-util:jar:1.0.0:compile [INFO] | | \- org.apache.cocoon:cocoon-xml-api:jar:1.0.0:compile [INFO] | +- org.apache.cocoon:cocoon-sitemap-impl:jar:1.0.0:compile [INFO] | | +- org.apache.cocoon:cocoon-sitemap-api:jar:1.0.0:compile [INFO] | | +- commons-collections:commons-collections:jar:3.2:compile [INFO] | | \- commons-jxpath:commons-jxpath:jar:1.2:compile [INFO] | | \- junit:junit:jar:3.8:compile [INFO] | +- org.apache.cocoon:cocoon-sitemap-components:jar:1.0.0:compile [INFO] | +- org.apache.cocoon:cocoon-xml-resolver:jar:1.0.0:compile [INFO] | | \- org.apache.cocoon:cocoon-xml-impl:jar:1.0.0:compile [INFO] | +- org.apache.cocoon:cocoon-thread-api:jar:1.0.0:compile [INFO] | | \- concurrent:concurrent:jar:1.3.4:compile [INFO] | +- org.apache.cocoon:cocoon-xml-util:jar:1.0.0:compile [INFO] | +- org.apache.excalibur.components:excalibur-pool-api:jar:2.2.1:compile [INFO] | | \- org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile [INFO] | +- org.apache.excalibur.containerkit:excalibur-logger:jar:2.2.1:compile [INFO] | +- org.apache.excalibur.components:excalibur-store:jar:2.2.1:compile [INFO] | +- org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile [INFO] | +- commons-io:commons-io:jar:1.3.1:compile [INFO] | +- commons-jexl:commons-jexl:jar:1.0:compile [INFO] | +- xalan:xalan:jar:2.7.0:compile [INFO] | +- xerces:xercesImpl:jar:2.8.1:compile [INFO] | +- xml-apis:xml-apis:jar:1.3.02:compile [INFO] | +- xml-resolver:xml-resolver:jar:1.2:compile [INFO] | +- org.apache.cocoon:cocoon-store-impl:jar:1.0.0:runtime [INFO] | | \- net.sf.ehcache:ehcache:jar:1.2.4:runtime [INFO] | \- org.apache.cocoon:cocoon-thread-impl:jar:1.0.0:runtime [INFO] +- org.apache.cocoon:cocoon-servlet-service-components:jar:1.0.0:compile [INFO] | +- org.apache.cocoon:cocoon-servlet-service-impl:jar:1.0.0:compile [INFO] | | \- org.apache.excalibur.components:excalibur-sourceresolve:jar:2.2.3:compile [INFO] | \- org.apache.cocoon:cocoon-linkrewriter-impl:jar:1.0.0:compile [INFO] +- org.apache.cocoon:cocoon-template-impl:jar:1.1.0:compile [INFO] | +- org.apache.cocoon:cocoon-expression-language-api:jar:1.0.0:compile [INFO] | \- org.apache.cocoon:cocoon-expression-language-impl:jar:1.0.0:compile [INFO] | \- commons-lang:commons-lang:jar:2.3:compile [INFO] +- org.apache.cocoon:cocoon-flowscript-impl:jar:1.0.0:compile [INFO] | \- rhino:js:jar:1.6R7:compile [INFO] \- javax.servlet:servlet-api:jar:2.4:provided Interestingly, there is no mention of commons-logging after I added the exclusions to the pom file. But why does it bother to copy the commons-logging jar to the WEB-INF/lib folder if it knows nothing depends on it? David Legg Reinhard Pötz wrote: I suppose I could start fiddling with plugin exclusions but this is getting silly. Do I really have to work this hard to try to make sure a jar file isn't included in the classpath? Use the Maven dependency plugin (the 'tree' goal) to find out what dependencies have a dependency on the libraries that you want to remove. Then you have to remove them from ALL occurrences by adding exclusions sections. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 - Mixing SLF4J with Cocoon
Thanks for responding Ralph. Cocoon 2.2 is using commons-logging, so in the environment shown by your stack trace it would also be going to SLF4J and the SimpleLogger via the jcl adapter. I guess it would help to know what version of SLF4J is in use and where its jars are in the various places they could be. Maybe part of the problem is that the slf4j-log4j12 pom file on the Maven repo has a bad checksum: - Downloading: http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.0.1/slf4j-log4j12-1.0.1.pom 406b downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '37304fd56d9cdda797718e6710637d232986c442'; remote = '15558150f0136e9802bb95a347e0045fb4ffe697' - RETRYING Downloading: http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.0.1/slf4j-log4j12-1.0.1.pom 406b downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '37304fd56d9cdda797718e6710637d232986c442'; remote = '15558150f0136e9802bb95a347e0045fb4ffe697' - IGNORING Cocoon does not directly use Log4j. It uses an abstraction layer that defaults to log4j. slf4j is also an abstraction layer. In the stack trace you have shown below it is using its SimpleLogger implementation. This can be replaced with Logback, Log4j or java.util.logging. You might simply try replacing slf4j-simple.jar with slf4j-log4j12.jar. I'll give it a go but I'm not sure how to do that where Maven is involved. I guess I change a dependency in a pom.xml file? If I don't edit a file won't Maven simply put the old jar file in the classpath again? I've heard that Commons Logging is now considered evil by some. Would it make sense to try to get everything in my app to use SLF4J? Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing 2.2
Hi Patrick, Is it right, that one has just to fire mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org and maven will install all (standard) dependencies transitive by itself (and copy everything into my local repository as always)? Pretty much! You should think of C2.2 applications as being a collection of different blocks some generated using the command you show above and some from different archetypes. Not all of your blocks have to be 'Cocoon blocks'. And how is one able to get the 'old' cocoon-samples page running (normally I've just hit mvn jetty:run to start the samples inside the svn-cocoon-trunk-version)? It sounds like you did all the right things except maybe you forgot to change into the '[cocoon trunk]\core\cocoon-webapp' folder and then issue the 'mvn jetty:run' command and view the result at 'http://localhost:/'. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing 2.2
Patrick, It sounds like you did all the right things except maybe you forgot to change into the '[cocoon trunk]\core\cocoon-webapp' folder here is the problem. After downloading the 2.2.0 binary, there is no such folder. Should I better stick with a version from trunk during development ?? So building cocoon by myself is still the way to go (I mean with -P allblocks semantics etc. Ah! I see. What I would do is checkout the latest version from trunk (see [1] for details). But *don't* use this for development of your apps. Simply use it for reference. Once you have that installed you should be able to run the sample webapp as I described by changing into the '[cocoon trunk]\core\cocoon-webapp' folder and then typing 'mvn jetty:run' and viewing 'http://localhost:/'. When actually developing your own Cocoon web app follow the pattern shown in the tutorials [2]. If you want to do something in your own app that you've seen demonstrated in the sample app you could copy appropriate bits from the sample into your own blocks. For example you might see useful items in the sitemap or required dependencies in the pom.xml files or various configuration beans that you could adapt. Regards, David Legg [1] http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g4/g1/g1/798.html [2] http://cocoon.apache.org/1370_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing 2.2
Patrick, Why is there a binary download available, if (hopefully most) users build their apps with maven and dependencies are obtained automatically? I guess it's a comfort for those not able to use Maven for some reason. I think of it as a transitional thing. For those of us trying to get to grips with Maven, SSF, Blocks etc this is a scary time! The results are well worth it though. When I think back to the Joy I felt getting Bertrand's Cocoon Bricks demo working and how it magically patched various files automatically when a new version of Cocoon was released I knew there had to be a better way ;-) David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing 2.2
Hi Mika, as an semi-amateur web application developer I have to say that moving on to 2.2 has been too big step for me. Not familiar with the Maven and even figuring out of the examples has caused me pain to understand what's going on... I understand exactly what you mean ;-) So I would appreciate a lot if someone could wrote a stepping stone page to those who aren't familiar with the framework which 2.2 uses, but who know something about 2.1. Or does it already exist? Well... there was one attempt [1] but don't get your hopes up! I think you're right though. We do need something a bit more general than the tutorials [2] to introduce people to the new concepts used in Cocoon 2.2 Just as important we need to say where they fit in and what they replace compared to earlier versions. I did update the Cocoon tutorial recently [3]. If you haven't read it for a while have another look and see if it makes more sense to you. If I have time I'll see if I can create a more introductory page which could be read before following the tutorials. Regards, David Legg [1] http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1419.html [2] http://cocoon.apache.org/1370_1_1.html [3] http://cocoon.apache.org/2.2/1159_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
C2.2 - Mixing SLF4J with Cocoon
I'm trying to add a new block to a Cocoon web app and every time I try to do a 'mvn jetty:run' command I get a 'java.lang.AbstractMethodError' and the web app just seems to stop serving web pages (error list shown at end of this message). The block in question makes calls to the Sesame [1] RDF triplestore. The important thing is that, like a lot of modern Java apps, Sesame makes use of SLF4J [2] to do its logging. I'm not familiar with the various logging frameworks but I think I've accidently walked into a minefield here! Cocoon seems to use Log4j, Jetty might be using something else and my block might need slf4j. Add to this that I've seen a report about slf4j not playing well with the Reloading Class Loader (RCL) and I think I'm well and truly stuffed! Please, if anyone knows how to get a library that uses slf4j to play nicely in a Cocoon environment I'd be very grateful ;-) Regards, David Legg Errors... ... [INFO] [jetty:run] [INFO] Configuring Jetty for project: meerkat-browser ... 2008-07-15 16:57:35.032::INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] Starting jetty 6.1.7 ... 2008-07-15 16:57:35.112::INFO: jetty-6.1.7 ... 2008-07-15 16:57:36.964::WARN: failed [EMAIL PROTECTED]/,D:\projects\meerkat\meerkat-browser\target\rcl\webapp} java.lang.AbstractMethodError: org.slf4j.impl.SimpleLogger.trace(Ljava/lang/String;)V at org.apache.commons.logging.impl.SLF4JLog.trace(SLF4JLog.java:82) at org.springframework.core.CollectionFactory.createConcurrentMapIfPossible(CollectionFactory.java:195) ... [1] http://www.openrdf.org/ [2] http://www.slf4j.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 - Web archetype whodunnit!
Barbara Slupik wrote: I test my blocks in maven/jetty. After everything works I do the following: Thanks Barbara, I went back and tested my blocks again before trying to turn them into a webapp and one of them stopped working... so I'll go and figure out why. I suspect it boils down to a checksum problem with the SL4J package on the maven repository. I think I downloaded this separately last time and now that I've cleaned my local repository it has gone away :-( Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
C2.2 - Web archetype whodunnit!
In true detective style I'm trying to work out whodunnit! It's probably the butler! but in case it's not I'd appreciate any help. I've successfully built a Cocoon block and a brand new Cocoon generator and between them created a pipline to produce some HTML. When I change into the Cocoon block's directory and type 'mvn jetty:run' all is well and I can view the block's output in a browser with no trouble. I now want to create a Cocoon web application block in order to generate a war file and also begin adding other blocks to handle other aspects of the web application. I've followed (and edited!) the tutorials so I wasn't expecting any problems here... but I wasn't so lucky! Having created the web app block (as per the deployment tutorial [1]) I updated the pom file so that the web app block knew about the other blocks. When I changed into the Web app block's directory and ran 'mvn jetty:run' I noticed a lot of messages scroll off the screen but Jetty seemed to launch ok. However when I try viewing the output in a browser I get 404 errors. So it looks like Jetty is running but the browser requests are either not being passed on to Cocoon at all or the Cocoon web app block is not passing the request on to the appropriate Cocoon block underneath it. The trouble is I'm looking at a lot of messages from various systems that mean nothing to me. When I looked at the messages that scrolled off the screen they contained the following: - [...] 2008-07-13 12:57:46.840::INFO: jetty-6.1.7 2008-07-13 12:57:53.708::INFO: No Transaction manager found - if your webapp requires one, please configure one. log4j:WARN No appenders could be found for logger (org.springframework.util.ClassUtils). log4j:WARN Please initialize the log4j system properly. 2008-07-13 12:57:55.126::WARN: failed [EMAIL PROTECTED]/,D:\projects\meerkat\meerkat-webapp\target\meerkat-webapp-1.0-SNAPSHOT} java.lang.AbstractMethodError: org.slf4j.impl.Log4jLoggerAdapter.trace(Ljava/lang/String;)V at org.apache.commons.logging.impl.SLF4JLog.trace(SLF4JLog.java:82) at org.springframework.core.CollectionFactory.createConcurrentMapIfPossible(CollectionFactory.java:195) at org.springframework.web.context.ContextLoader.clinit(ContextLoader.java:153) at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:53) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:44) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540) [...] It looks like I've got a lot of homework to do... Should I be worried about not having a transaction manager? Do I need appenders for my logger? What might cause a java.lang.AbstractMethod error and where do I start looking? I'm willing to add additional documentation to the site but I suspect there are some fundamental things I need to add to the tutorial like how to set up the logger, how to do simple spring bean configuration and how the Cocoon web application archetype works. Regards, David Legg [1] http://cocoon.apache.org/2.2/1362_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Firefox 3 and URL
Have you checked that the DOCTYPE being returned by Cocoon is identical between Firefox 2 and 3? I just wondered if when you use Firefox 3 Cocoon serves a page in quirks mode or application/xml+xhtml or something else which would make getElementsByTagName() behave differently. David Legg Alexandre Mazouz wrote: Okay, it seems that getElementsByTagName() has different behavior in FireFox 2.0 and Firefox 3.0. why? i don't know may be to give us more bug to fix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Daisy repository is down
I'm sure the right people probably know already but... the Daisy site [1] is down. I don't think the repository manager is working. Initialization Problem Message: null Description: No details available. Sender: org.apache.cocoon.servlet.CocoonServlet Source: Cocoon Servlet cause Could not find component (key [daisy-repository-manager]) request-uri /daisy Apache Cocoon 2.1.9 http://cocoon.apache.org/ [1] http://cocoon.zones.apache.org/daisy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: some words about property configuration
Johannes, until someone with real knowledge comes along I think the Cocoon 2.2 way of configuring a project is to use the Spring Configurator [1]. In particular you should look at the property handling page [2]. It looks scary to me ;-) David Legg Johannes Hoechstaedter wrote: Hi, I want to have some infomations about configuration of cocoon by property files. The documentation on http://cocoon.apache.org/2.2/core-modules/core/2.2/1261_1_1.html seems to be not up to date. Can you please point out a place where I can find some updated documentation? [1] http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1304_1_1.html [2] http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1310_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question about how to reference a css file from within xslt (cocoon 2.2)
Jasha wrote: Your reference to the CSS is relative to the request URI of the page. If the request URI for the page is /foo/bar/page.html your browser will attempt to request the CSS on /foo/bar/resource/external/css/myDemo.css. This may not be matched in your sitemap. That's right and of course if you use relative URLs in your CSS file (to include background images etc) they are relative to the CSS file and not the web page so your site map may have to cope with those too. David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Documentation - the update process
After a documentation page has been edited by someone with doc:editor role, how does that change then appear on the public site? Do I have to manually inform a committer or raise a JIRA each time I change a simple typo? or do all changes get posted somewhere for committers to see? David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Documentation - the update process
Thanks Reinhard, Do I have to manually inform a committer or raise a JIRA each time I change a simple typo? or do all changes get posted somewhere for committers to see? Notifications are sent to [EMAIL PROTECTED] Additionally, http://cocoon.zones.apache.org/daisy/cdocs/1201.html contains a section, that shows all docs that haven't been released by a docs committer yet. I hoped that was the case. Great! David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[C22] Custom generator config
I would like to write a custom Cocoon generator in a Cocoon 2.2 application. I've come across the excellent Creating a Generator [1] page on the Cocoon site but I haven't spotted how Cocoon knows that when you use map:generate type=bean / in the sitemap it should use the new class BeanGenerator as defined in the article. I understand the 'old' way of doing this by creating a sitemap.xconf file but I'd like to master the new technique. I suspect if I read and re-read the Cocoon spring configurator [2] pages it might sink in... but it would have to sink a long way ;-) Regards, David Legg [1] http://cocoon.apache.org/2.2/core-modules/core/2.2/688_1_1.html [2] http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1304_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [C22] Custom generator config
Robin Wyles wrote: Yes, you may define them in your Spring config, like so: bean name=org.apache.cocoon.generation.Generator/myGenerator class=com.mycom.MyGenerator scope=prototype !-- Property injection -- /bean Excellent! I will try it out immediately. I'm sure Bng will be happy too ;-) David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [C22] Custom generator config
Boris Goldowsky wrote: I do think improving the documentation would help tremendously with the general public perception of the quality/maturity of the Cocoon framework. Are there things the community can do to help out? I thought the same thing, Bng. So after Grek pointed me to the contribution page [1] I signed up right away! The documentation system is a complex beast; but I couldn't sit back any longer ;-) David Legg [1] http://cocoon.apache.org/1273_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tutorial improvement suggestion
Grek, The only missing thing is the actual archetype catalog XML file. David, would you like to prepare own? I'm not sure how archetype plug-in supports this file generation but even if support is bad you could always prepare the catalog by hand (fortunately enough, the list is not long for us). I've generated the archetype catalog. I've attached it to this email. It wasn't too difficult... just had to run mvn archetype:crawl and it placed the new file in my local repository ([MAVEN_REPO]/.m2/repository/archetype-catalog.xml). I then edited this manually to change the order of the archetypes listed from simplest to most complex and added some human understandable descriptions. I've confirmed that the following command works with a local copy of the catalog: - mvn archetype:generate -DarchetypeCatalog=file://c:\temp\archetype-catalog.xml and generates the following interactive questions: - [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. ... [INFO] [archetype:generate] [INFO] Generating project in Interactive mode [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven. archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: local - cocoon-22-archetype-block-plain (Creates an empty Cocoon block) 2: local - cocoon-22-archetype-block (Creates a minimal Cocoon block) 3: local - cocoon-22-archetype-webapp (Creates a web application Cocoon block) Choose a number: (1/2/3): Choose archetype: There is a caveat though. I noticed on the Maven bug list [3] that some earlier versions of the plugin didn't handle local or remote catalog files. However this seems to have been fixed in the 2.0 alpha-3 version. So if someone would place this file on the site and update the documentation page we should be good to go. I registered on the Cocoon documentation site [2] to see if I could update the pages myself but quickly discovered this doesn't let me actually create or edit the documentation :-( Of course this file will have to be updated from time to time. I have a feeling that Reinhard Pötz is our man for this ;-) He authored the Maven archetype plugin list [2]. This page isn't easy to find so there should at least be a link to it from the tutorial pages. Regards, David Legg [1] http://cocoon.zones.apache.org/daisy/ [2] http://cocoon.apache.org/2.2/maven-plugins/ [3] http://jira.codehaus.org/browse/ARCHETYPE-124 ?xml version=1.0 encoding=UTF-8? archetype-catalog archetypes archetype groupIdorg.apache.cocoon/groupId artifactIdcocoon-22-archetype-block-plain/artifactId version1.1.0-SNAPSHOT/version descriptionCreates an empty Cocoon block/description /archetype archetype groupIdorg.apache.cocoon/groupId artifactIdcocoon-22-archetype-block/artifactId version1.1.0-SNAPSHOT/version descriptionCreates a minimal Cocoon block/description /archetype archetype groupIdorg.apache.cocoon/groupId artifactIdcocoon-22-archetype-webapp/artifactId version1.1.0-SNAPSHOT/version descriptionCreates a web application Cocoon block/description /archetype /archetypes /archetype-catalog- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tutorial improvement suggestion
Thanks for taking care of creating of this file. However, if we are going to upload it to our site we need an explicit sign of contribution for legal reasons. Therefore I would like to ask you to create a JIRA issue and attach your file to it. Then we can proceed. No problem. I have created COCOON-2214 [1] This page isn't easy to find so there should at least be a link to it from the tutorial pages. David, what about the link in the horizontal menu below search field? Doh! Where'd that come from ;-) Thanks for the information about how to contribute. I've signed up. Regards, David Legg [1] https://issues.apache.org/jira/browse/COCOON-2214 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tutorial improvement suggestion
Just thought I'd mention a tiny improvement that could be made to the Your first Cocoon application using Maven 2 [1] web page. The section titled Creating a block gives a maven command which uses the deprecated goal archetype:create instead of archetype:generate leading to the following disconcerting message during the build: - [INFO] [archetype:create] [WARNING] This goal is deprecated. Please use mvn archetype:generate instead If I use archetype:generate instead then Maven interactively asks me some questions I have to guess the answers to ;-) Regards, David Legg [1] http://cocoon.zones.apache.org/dev-docs/2.2/1159_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tutorial improvement suggestion
Grek, The section titled Creating a block gives a maven command which uses the deprecated goal archetype:create instead of archetype:generate 1. Let's switch to interactive mode and provide archetype catalog... 2. Give up interactive mode completely and stick to utterly long command... The question is which one we prefer? What do you, dear users, think about it? I think I prefer option 1 as well. I don't mind the interactivity as it helps beginners get it right first time... especially if you give clear instructions in the tutorial about what to answer at each prompt and what the answers mean. The Maven manual page for this plugin [1] is more like I would expect to see in the tutorial (although I'd definitely want the responses highlighted though). I can't believe that Maven attempts to list *every* archetype. That list is going to get awfully long, very quickly. Regards, David Legg [1] http://maven.apache.org/plugins/maven-archetype-plugin/usage.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
C22 - Maven artifact missing
I Just tried building Cocoon from svn by following these instructions [1] and got the build error listed below. I've tried deleting my local repository and tried building all the blocks with: mvn install -Dmaven.test.skip=true -P allblocks All with the same result. Should I just try again later or is their something I can do to resolve this? I'm still trying to get to grips with Maven and this sort of thing is very frustrating ;-) Regards, David Legg [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) org.apache.cocoon:cocoon-pipeline-impl:test-jar:tests:1.1.0-SNAPSHOT Try downloading the file manually from the project website. ... Path to dependency: 1) org.apache.cocoon:cocoon-pipeline-components:jar:1.1.0-SNAPSHOT 2) org.apache.cocoon:cocoon-pipeline-impl:test-jar:tests:1.1.0-SNAPSHOT -- 1 required artifact is missing. for artifact: org.apache.cocoon:cocoon-pipeline-components:jar:1.1.0-SNAPSHOT from the specified remote repositories: apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository), central (http://repo1.maven.org/maven2) [1] http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g4/g1/g1/798.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Grzegorz Kossakowski wrote: David, you are the second person reporting this issue, the first one was Alexander[1] so there must be an issue with Cocoon dependencies here. I noticed that thread already thanks, but as it didn't conclude I wondered if it had been resolved. Since I'm now sure that's a problem of Cocoon and not local configuration I'll investigate into this issue a little more. Thanks Grek. If it's any help I tried this under Win XP SP2, with Maven 2.0.9 and JDK 1.6.0_02 Regards, David Legg [1] http://thread.gmane.org/gmane.text.xml.cocoon.devel/77945 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Grzegorz Kossakowski wrote: Skipping test phase is not a good idea anymore and docs need an update (I've done it already). Anyway, this flag shouldn't make the build fail. Would you believe it! I tried it without the -Dmaven.test.skip=true flag and it passed all the tests and completed the build :-) I suspect that an artifact created as a result of the tests is a required dependency somewhere. Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C22 - Maven artifact missing
Grzegorz Kossakowski wrote: I don't have an idea why it behaves differently. Maybe it's another bug in Maven that we have found here? I think it's a conspiracy to always make us run regression tests ;-) Thanks for updating the web site. David. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting a pipeline for true XHTML
Kjetil Kjernsmo wrote: If you're interested, there is a very good classic article of the reasons why using XHTML is considered harmful. Yup, I know hixie both personally and technically (we worked together at Opera), and I think all his arguments are invalid... That's never happened to me before ;-) Thanks for the background info. I'm interested in your quest too. I've done something similar with pre 2.2 versions of Cocoon... but that was easy because the included sample apps showed you how to do it. David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting a pipeline for true XHTML
Kjetil Kjernsmo wrote: All, I much prefer to work with XHTML, and do so sending application/xhtml+xml, but when sending to browsers, certain clients fail. It's still a difficult decision on whether to use XHTML or HTML as the final output to a user's browser. I've seen valid arguments for both sides. If you're interested, there is a very good classic article [1] of the reasons why using XHTML is considered harmful. Regards, David Legg [1] http://www.hixie.ch/advocacy/xhtml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
C2.2 Tutorial comment
I've been prompted by the recent C2.2 release announcement to follow the web tutorial [1]. On the whole it's been very good but I've come across a stumbling block (no pun intended!) toward the end of the series. Having got to the part which talks about deploying web applications [2] the text under the sub-heading Using a block within the web application says to use: - mvn package jetty:run to get the newly created Cocoon web application to run. Unfortunately, I get the following which makes me suspect a step in the instructions is missing somewhere: - D:\projects\cocoon\getting-started-app\myCocoonWebappmvn package jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] [INFO] Building myCocoonWebapp [INFO]task-segment: [package, jetty:run] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) com.mycompany:myBlock1:jar:1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.mycompany -DartifactId=myBlock1 -Dv ersion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=com.mycompany -DartifactId=myBlock1 -Dver sion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryI d=[id] Path to dependency: 1) com.mycompany:myCocoonWebapp:war:1.0-SNAPSHOT 2) com.mycompany:myBlock1:jar:1.0-SNAPSHOT -- 1 required artifact is missing. for artifact: com.mycompany:myCocoonWebapp:war:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] Total time: 9 seconds [INFO] Finished at: Mon May 19 17:43:11 BST 2008 [INFO] Final Memory: 13M/24M I'm using Maven 2.0.9 on Windows XP but I have a feeling that would make little difference here. Regards, David Legg [1] http://cocoon.apache.org/2.2/1159_1_1.html [2] http://cocoon.apache.org/2.2/1362_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: C2.2 Tutorial comment
Hi Grek, Yep, there is missing step in tutorials. Go to myBlock1/ and execute: mvn install then do the same for myBlock2. This will install blocks into local Maven repository so myCocoonWebapp can find them. Then you can return to back to the tutorial on deployment. Thanks. That did it. David. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RESTful API using Cocoon
I have these two references in my bookmarks ... http://www.wallandbinkley.com/quaedam/?p=104 http://article.gmane.org/gmane.text.xml.cocoon.devel/74571 HTH David Legg Luca Morandini wrote: As per subject: can someone point me to a RESTful API built using Cocoon ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Sparql Transformer ?
Hi Bernard, So I'm looking for a Sparql Cocoon Transformer both to extract triples with a SELECT query ... ... or to build others triples tith a CONSTRUCT query ... ... to be able to send this result to a XSLT transformer for exemple ... ... and then produce some Web Page I've toyed with this idea too. You may want to check out Fresnel [1]. When you think about it, RDF deals with graphs and graphs are difficult to manipulate with XPath (and hence XSLT) because XPath assumes the data is in the form of a tree. Fresnel is a bit like XSLT for RDF. Given a set of instructions, some RDF data and a location in the RDF to be displayed it transforms some or all of the RDF into a DOM tree and then optionally formats the tree ready for display on a web page or further processing using XSLT. Now the question is... how to fit it into Cocoon in a modular way! David Legg. [1] http://jfresnel.gforge.inria.fr/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.2 install
Babak Farhang wrote: Ah!... I understand ;-) Maven does all the 'installing' for you.. I'd like to get the source code when 'installing' Coccon 2.2. Can I get the source code for 2.2 using maven, also? Um? No I don't think so. I download the source from the subversion server [1]. The instructions to build that are in the README file (and yes... Maven is also used to build that!) This file also contains some very useful links [2] and [3] which may answer all your questions. - David. [1] http://svn.apache.org/repos/asf/cocoon/trunk [2] http://cocoon.zones.apache.org/daisy/documentation/g2/756.html [3] http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g4/g1/g1/798.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.2 install
Fawzib Rojas wrote: Cocoon 2.2 is radically different but I definitely think it's worth it. I don't mind it being different, the problem is no documentation on how to do things (or if there is, I can't find it) and I can't even figure out how to install it. Ah!... I understand ;-) Maven does all the 'installing' for you. As I said, Cocoon 2.2 is very different from earlier versions. Maven is the key. If you run Maven from the command line as shown in the tutorial [1] it will download what it needs from a remote repository and build a skeletal Cocoon 2.2 application for you. Then you have to figure out how to split up your existing app into suitable blocks and fit them into the new structure. Following the other tutorials in sequence will help you understand how to connect up other blocks. Maven is used to do most of the heavy lifting from compiling your source files to creating javadocs, running tests and deploying your final application. It would be wise to read up on Maven a little. - David. [1] http://cocoon.apache.org/2.2/1159_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.2 install
Hi Fawzib, The main overview of Cocoon 2.2 can be found on the apache web site. [1] You should also take a close look at the section titled 'Your first Cocoon application using Maven 2' [2] Cocoon 2.2 is radically different but I definitely think it's worth it. The fact it uses Maven and Spring and makes a decent attempt to modularize are reasons enough for me to update. Keep in mind that you no longer get a bucket-load of examples ready to run once you have built it and the documentation is still very fragmentary at this stage. I wonder why the version number went from 2.1 to 2.2 when things have changed so much? - David. [1] http://cocoon.zones.apache.org/dev-docs/2.2/ [2] http://cocoon.zones.apache.org/dev-docs/2.2/1159_1_1.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.2 Trunk build against JDK 6 and Maven 2.0.7
Just for information the 200m figure quoted below didn't work for me until I increased it to 300m on Win XP sp2. Grzegorz Kossakowski wrote: In Cocoon's README.txt there is a paragraph: If you have build failures due to out-of-memory conditions, increase the JVM maximum memory limit: $ MAVEN_OPTS=-Xmx200m $ export MAVEN_OPTS I must say, I was a little afraid that Cocoon was moving over to Maven when I first found out. However, after looking into it and playing with the Block based build system I'm all for it!! Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring Contexts
Lally Singh wrote: If anyone knows a _short_ book on getting up to speed on using Spring, I'd appreciate it. The tomes I've got on Cocoon Hibernate are already pretty heavy. My favourite is Spring A developer's Notebook by Tate Gehtland published by O'Reilly: ISBN 0-596-00910-0 in a Purple cover. O'Reilly also do a Hibernate A Developer's Notebook in the same series which I found very readable too. I might get shot for this... but I'd be tempted to use the 'Singleton' pattern to manage the Spring context. I think the 'proper' way to do it is to create your own Cocoon component which implements ThreadSafe and Contextualizable. You could then create and inject the Spring context into this at initialization time. It should then be available from the context of your application and not have to be explicitly passed around as a parameter. I did this once for the HiveMind Registry so I could follow the Bricks CMS demo (http://wiki.apache.org/cocoon/BricksCms). David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fresnel + Cocoon = Metadata Marriage made in heaven?
Sorry for the cryptic subject line! In essence I'm wrestling with a conceptual problem... how to format information for presentation in a manageable way. In most Database projects you have a fixed schema that rarely changes except perhaps when the project is revised. My data will be in the form of RDF in which the properties radiating from a resource can be many and varied. Worse still, new types of RDF resources could be added on a daily basis. An update cycle which involves manually re-writing an XSLT style sheet every day is untenable! If you haven't come across it yet, Fresnel [1][2] is a newish language that allows you to express which bits of a given RDF resource should be displayed, which bits shouldn't, the order in which they should be listed, what styles should be applied to it, etc. In many ways it looks to me to be a sort of XSLT for RDF. It uses an XPATH selector-like structure to specify RDF resources and its own OWL based language to define the transformations. The result is an XML tree structure; ripe for processing through Cocoon's pipeline. Some older Cocoon users may even recognize Stefano Mazzocchi's name in the contributor list ;-) With Fresnel, it might be possible to dynamically add new resource formatting instructions and hence solve the problem. Has anyone looked at using an implementation of Fresnel in a Cocoon project? Has anyone got any constructive ideas on how to employ Cocoon to format data in a dynamic, non-manually updateable fashion? [1] Fresnel info - http://www.w3.org/2005/04/fresnel-info/ [2] Fresnel presentation - http://dig.csail.mit.edu/2006/Talks/0724-fresnel/ - David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IE AJAX Focus Stuff (maybe a little off topic)
Hi Gary, Replying to my own messages. Sad ;). I can't stand seeing a grown man cry ;-) So I thought I'd chip in with some ideas. Looking at the Microsoft documentation ( http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp ) it would seem that an item's focus cannot be set until the document has fully loaded. Further more it will only work if the tabindex attribute is set. From my cursory look it would seem the general consensus is this is a documented bug. This may explain why your fix only worked after you put a debug alert() box on screen. - David. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CocoonGT 2006 lecture videos?
Was this years Cocoon Get Together lectures captured on audio or video? I found the 2005 videos[1] extremely useful and have been scanning the Wiki[2] while holding my breath. With the printed notes on my lap and the video player running it is almost like being there (especially with a drink in my hand!). David Legg --- [1] http://www.cocoongt.org/archive/2005/Slides-and-recordings.html [2] http://wiki.apache.org/cocoon/GT2006Notes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving up XHTML?
Joerg Heinicke wrote: All this producing XHTML which must not conform to XHTML is really awkward - but I know it's necessary for IE. This is slightly off topic but choosing between using XHTML and HTML 4.01 strict is a real can of worms. The classic text on this subject is http://www.hixie.ch/advocacy/xhtml In summary I don't believe it is a case of use XHTML because it uses XML and therefore must be better... choose carefully! Choosing XHTML has serious implications when it comes to supporting AJAX and for CSS too. As Cocoon users we are in the privileged position of being able to dynamically configure what gets sent to the user depending on their browser... but you have to ask if all the extra work involved in designing suitable content and all the extra permutation checking is worth it. David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]