SessionAttributeSelector
I have problems using the SessionAttributeSelector. I have tried basically any syntax I have found in the various documents, but none worked. The when test is never successful. Has anybody managed to use this selector successfully? And what do I have to do to make the selector work? Thanks for your help. Joseph BREMER - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LDAP transformer - insert, delete, update
Hello, I have red it. I red a source of the LDAPTransformer too. In the java doc api for 2.1.4 is description of the LDAP xml ... !ELEMENT execute-replace replace attribute on a directory-server (ldap) !ELEMENT execute-add add attribute on a directory-server (ldap) ... How could I use this elements? Could someone give description or example please? Thanks in advance Martin Joerg Heinicke wrote: On 28.04.2004 15:57, grofcik.lan wrote: Hello, I would like to use LDAP transformer with possibility to insert update and delete items. Has cocon 2.1.4 LDAP transformer with this functionality? If yes, how could i use it. It's not much, but have you read the available documentation? http://cocoon.apache.org/2.1/userdocs/transformers/ldap-transformer.html http://wiki.cocoondev.org/Wiki.jsp?page=LDAP Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Informacia od NOD32 1.574 (20031206) __ Tato sprava bola preverena antivirusovym systemom NOD32. http://www.eset.sk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically changing labels, was Re: Woody + FlowScript : documentation on model
I resolved the problem by using XSP to generate my form template. Based on the request or session attributes I can adapt the template to my need ! Thx for your comments Laurent Bruno Dumon [EMAIL PROTECTED] 28/04/2004 20:01 Please respond to users To: [EMAIL PROTECTED] cc: Subject: Re: Dynamically changing labels, was Re: Woody + FlowScript: documentation on model On Wed, 2004-04-28 at 09:49, [EMAIL PROTECTED] wrote: I think that now this is a widget type output ? I always thought of the output widget as the read-only equivalent of a field widget, and it seemed conceptually incorrect to misuse it as a label. From a technical point of view, it probably doesn't make much difference though. However for labels you often want to use mixed content (e.g. to get i18n-ized labels). This could be done by making an XmlizalbeDatatype or something like that. But then it still wouldn't work because then it needs a convertor, and converters convert to plain strings... Bruno Dumon [EMAIL PROTECTED] 27/04/2004 18:50 Please respond to users To: [EMAIL PROTECTED] cc: Subject: Re: Dynamically changing labels, was Re: Woody + FlowScript :documentation on model On Tue, 2004-04-27 at 18:59, Tim Larson wrote: On Tue, Apr 27, 2004 at 06:14:34PM +0200, [EMAIL PROTECTED] wrote: Dear Tim , I also think about it but my problem is that I'm in an international environment and that I use i18n to provide message So what I want is changing an i18n:text key=... with the key I want. Is it possible with widget output ? It should be possible using a messages widget. See the comments in the flowscript for the customvalidationdemo sample form: cocoon-2.1.4/src/blocks/woody/samples/flow/customvalidationdemo.js cocoon-2.1.4/src/blocks/woody/samples/forms/customvalidationdemo_form.xml cocoon-2.1.4/src/blocks/woody/samples/forms/customvalidationdemo_template.xml I'm wondering if: * anyone is using the messages widget? I've added it quite some time ago because a user seemed to need something like that, but haven't ever used it myself nor ever heard about someone using it. * and if there aren't more people who simply need a message, rather than a messages, widget, and if it'd be useful to add such a widget? -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing repeater in xsp Using V2 woody
On Thu, 2004-04-29 at 00:44, JD Daniels wrote: hmmm... i am confused again.. xsp:logic Form form = (Form)request.getAttribute(woody-form); Field field = (Field)form.getWidget(customerId); /xsp:logic The field customerId is there and has a value.. but it gives me java.lang.NullPointerException.. which makes me think with v2 I have to change how I get a handle on the widgets... any help? sure, I actually didn't understand why you said in your other message that it worked, as I suddenly thought of why it couldn't work: I assume the XSP page is not the form template shown as part of form.showForm, but a separate page after that? Then the woody-form isn't set in the request object and you need to do that yourself. I should warn though, that in fact you are not supposed to do this, as the V2 API is designed to give you no access to the original java widget (you'd better use the non-v2 api then) (I'm currently working on merging both in a third proposal). This should work: cocoon.request.setAttribute(woody-form, form.formWidget_.unwrap()); -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cocoon forms - flow custom validator
Hi there, I am using cocoon 2.1.5-dev (CVS 28/04/2004) to perform form handling with the Cocoon Forms framework. Everything works fine and the widgets get validated nicely, however, when I try to add custom validation to the flowscript by setting the form.validator it gets completely ignored. var form = new Form("forms/register.xml");form.validator = function(form, bizdata) {var validationError = new Packages.org.apache.cocoon.forms.validation.ValidationError("xxx"); if (form.getWidget("login").getValue() == "test") {form.getWidget("login").setValidationError(validationError);return false;} return true;} form.showForm( get_page_name(), bizdata ); I think the above code should be correct. I tried to do some debugging and am sure that the validator function just doesn't get called by the Forms class. When I use the _javascript_ debugger I can't actually get past the loadPageAndWait(). This is because when I break at the continuation the debugger jumps to the function declaration of the last called function, does however not go into the function when I tell it to. Any ideas as to why this behaviour occurs? thanks, Jakob
Re: serialize without namespace
Joerg Heinicke wrote: [...] How can I remove namespaces from my xml files? The Cocoon FAQ say in: http://cocoon.apache.org/2.1/faq/faq-serializers.html#faq-N1004C ... You could generalize this approach by using the serializer's configuration method to declare namespaces to be excluded. [...] What does the FAQ really mean? The section in the FAQ starts with One approach is to extend your serializer component and override the startPrefixMapping and endPrefixMapping methods to do nothing. This means you subclass an existing serializer. It's Java, not just configuring some options. Thanks for clarification. Maybe a good reason for starting to learn Java. The second option Another approach is to use an interim transformation step in your pipeline with a stylesheet described here. is much easier, only the link is no longer pointing to the correct anchor: That is what I am presently using. And it's only task is to remove xmlns from *only* the root element in order to turn proper xhtml into proper html map:match pattern=**.html map:generate src=cocoon:/{1}.xml/ map:transform src=remove-namespace.xsl/ map:serialize type=html/ /map:match and turn html xmlns=http://www.w3.org/1999/xhtml; ... /html into html ... /html Since html serializer already does some conversions - e.g. remove trailing slashes from empty elements - I expected this step to be done by it as well. So it looks to me as if I should try to work on the serializer. http://cocoon.apache.org/2.1/faq/faq-xslt.html#faq-N10075 http://wiki.cocoondev.org/Wiki.jsp?page=RemoveNamespaces Topic 5.) OmitNsTransformer of the latter sounds promising too. Think I will check it first. Thanks again for your attention! -- [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: serialize without namespace
Peter Lerche wrote: [...] Make an extra serializer step in your pipeline and put this XSLT script into it. [...] Hi Peter, thanks for your hint. To work with an extra stylesheet is what I am presently doing. But my intention was to get rid of that intermediate step and to understand the FAQ's proposal regarding the serializer's configuration. -- [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cocoon forms - flow custom validator
On Thu, 2004-04-29 at 09:52, Jakob Schwendner wrote: Hi there, I am using cocoon 2.1.5-dev (CVS 28/04/2004) to perform form handling with the Cocoon Forms framework. Everything works fine and the widgets get validated nicely, however, when I try to add custom validation to the flowscript by setting the form.validator it gets completely ignored. var form = new Form(forms/register.xml); form.validator = function(form, bizdata) { var validationError = new Packages.org.apache.cocoon.forms.validation.ValidationError(xxx); if (form.getWidget(login).getValue() == test) { form.getWidget(login).setValidationError(validationError); return false; } return true; } form.showForm( get_page_name(), bizdata ); I think the above code should be correct. I tried to do some debugging and am sure that the validator function just doesn't get called by the Forms class. When I use the JavaScript debugger I can't actually get past the loadPageAndWait(). This is because when I break at the continuation the debugger jumps to the function declaration of the last called function, does however not go into the function when I tell it to. Any ideas as to why this behaviour occurs? Does it work different then before? Note that the custom validator only gets called after the normal validation ended successfully (thus also all required fields must be completed) Since you're using latest CVS anyway, I'd suggest not to use that validator function but make use of the possiblity to add WidgetValidators to widgets. If you add such a WidgetValidator to the form itself, then this would be very similar to the form.validator function (except that it becomes part of the normal validation cycle, not something that is done afterwards). To do this from within flowscript: form.getWidget().addValidator(newValidator(function(widget) { (see javadoc of class WidgetValidator for more info on the behaviour of the code herin, basically if there's an error return false + set a validation error on some widget) }); with newValidator being an utility function to implement a java interface from within flowscript: function newValidator(validatorFunction) { var validator = {validate: validatorFunction }; var adapter = new JavaAdapter(Packages.org.apache.cocoon.forms.validation.WidgetValidator, validator); return adapter; } There might be some typos in all of the above. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing non-xhtml tags from a string ???
Il giorno 28/apr/04, alle 17:20, Marcin Okraszewski ha scritto: Hi, I'm building a webapp which allows to enter XHTML via forms. The problem is that I the entered XHTML *must* be valid XML. I use JTidy to correct any errors that may accure. So far so good. But it turns out that if JTidy gets some tag, that it doesn't know, it simply returns empty string :-( It is a bit confusing, since I use HTMLArea and while pasting text from Microsoft Office, there are o:p/ tags which causes the empty string !! Is there any way to throw such tags away? I don't know if it would really help, but you might try using CyberNeko [1] instead of JTidy. I've found it gives better results on average, particularly when dealing with [so-called] HTML pasted from Word. Ugo [1] http://www.apache.org/~andyc/neko/doc/html/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Comparison Axkit and Cocoon ?
Dear members, While browsing, I came on this project also supported by Apache ? http://axkit.org/ This is another XML publishing framework Is there someone who compare it ? What is best ? Why is apache supporting both project ? (I think that it is better to centralize effort on 1 framework ?) Do not hesitate to give comment Laurent
Re: Removing non-xhtml tags from a string ???
The empty string points probably to a thrown exception, doesn't it? Maybe you should first look for jTidy options for getting the error message to see, ignoring errors or even remove unknown tags. On a first sight at http://www.w3.org/People/Raggett/tidy/ I found an option word-2000: bool for ignoring Word 2000 markup. But of course this does not necessarily mean that jTidy supports it too. Yes, there is a method Parser.word2000(boolean), but it _ignores_, so passes these tags through, and so I have unbound prefix o in my xhtml. This results in errors while building xml later on. I found a TagSoap project, which fixes input to XML only. It doesn't tidy HTML, but in my case it seems to suit more. Regards, Marcin Okraszewski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to pass XSL param to stylesheet from sitemap
Basically I want to pass the matched pattern in {1} as the content of an XSL parameter to whatever stylesheet I am using. Is this possible? Thanks for any help. -- Terence Kearns ph: +61 2 6201 5516 Enterprise Applications Developer Enterprise Systems Support and Development Information and Communications Technology (ICT) Services University of Canberra, Australia - http://www.canberra.edu.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[woody / cforms] woody-lib.js causes delay
Hello list, In the case of a very large Woody form, it takes a lot of time (up to seconds) before a check (dis)appears in a checkbox after the user clicks in it. The same happens with radio buttons. It seems that this is caused by Woody's javascript code in woody-lib.js, since the problem does not occur when woody-lib.js is disabled. There is not a lot of code in woody-lib.js, however I cannot see what causes the delay. What happens when a checkbox is (un)checked? The delay is rather annoying for users filling out the form. Does anyone have a solution or workaround for this problem? Thanks, Niels -- Niels van Kampenhout Hippo Webworks Herengracht 141 1015 BH Amsterdam The Netherlands Tel +31 (0)20 5708910 Fax +31 (0)20 5708689 --- [EMAIL PROTECTED] / www.hippo.nl --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to pass XSL param to stylesheet from sitemap
On 29.04.2004 11:18, Terence Kearns wrote: Basically I want to pass the matched pattern in {1} as the content of an XSL parameter to whatever stylesheet I am using. Is this possible? Of course: map:match pattern=*.html map:generate src={1}.xml/ map:transform src=whatever.xsl map:parameter name=whateverParam value={1}/ /amp:transform map:serialize type=html/ /map:match Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Comparison Axkit and Cocoon ?
[EMAIL PROTECTED] wrote: Dear members, While browsing, I came on this project also supported by Apache ? http://axkit.org/ This is another XML publishing framework AXKit is written in Perl. I've never used it, nor noted its capabilities. Is there someone who compare it ? What is best ? Why is apache supporting both project ? (I think that it is better to centralize effort on 1 framework ?) Because Apache is technology agnostic. It wants to provide an environment where people, in the context of communities, can collaborate and innovate Anyway, people contribute to things that interest them, I can't see any way you could get AXKit guys (who presumably love perl) and Cocoon guys (who presumably love Java) to collaborate on a common product. I'm sure there's more than enough space in the world for both. And if there isn't, then let the best one win. Do not hesitate to give comment I haven't! Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing non-xhtml tags from a string ???
I don't know if it would really help, but you might try using CyberNeko [1] instead of JTidy. I've found it gives better results on average, particularly when dealing with [so-called] HTML pasted from Word. Ugo [1] http://www.apache.org/~andyc/neko/doc/html/ I must admit, that CyberNeko looks interesting :-) Regards, Marcin Okraszewski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Some Flow functions not found
We're using Cocoon 2.1.3, and have been integrating Flowscript into our project over the last several weeks. Today, when trying to use the functions cocoon.createPageLocal(), cocoon.createWebContinuation() and cocoon.sendStatus () I get an exception because the functions are unknown. The stack trace is below. Are these functions not available in Cocoon 2.1.3, or do we have some classpath problem? Thanks, John ERROR (2004-04-29) 11:38.30:124 [navigation.sitemap.handled-errors] (/navigation/764b336255621c286e0c4a75392e512369753057.identifyuser.jentro) Thread-7/PipelineNode: sendStatus is not a function. org.apache.avalon.framework.CascadingRuntimeException: sendStatus is not a function. at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:630) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:151) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:176) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:176) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:163) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:354) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at
RegexpURIMatcher problem
Hi, I cannot find any examples for using regular expressions in a map:match section of the sitemap. I want to match three types of URLs that are different only by one fragment, i.e.: map:match pattern=db/*/*/toc/*.xml map:match pattern=db/*/*/lot/*.xml map:match pattern=db/*/*/lof/*.xml There is a fourth URL type which is to be handled differently: map:match pattern=db/*/*/doc/*.xml I thought I could reduce the three first pipelines into one by doing something like this: map:match type=regexp pattern=db/*/*/[toc|lof|lot]/*.xml But I don't know how to reference the regex match in the generator. A helping hand or a link to examples of the usage of RegexpURIMatcher would be greatly appreciated. Also, is the regex matcher very costly in comparison to the wildcard matcher? Cheers, Jakob. Please cc: me directly, as I am on the digest list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sitemap-v06.rng
Hi all, I propose to change the RelaxNG validation file sitemap-v06.rng in this way: Component declaration like map:generator, map:transformer, map:serializer, and similars would need to be: define name=map.generator element name=map:generator ref name=map.generator.attlist/ ref name=component.config/ /element /define where component.config is defined as define name=component.config zeroOrMore element anyName except nsName ns=http://apache.org/cocoon/sitemap/1.0/ /except /anyName zeroOrMore attribute anyName except nsName ns=http://apache.org/cocoon/sitemap/1.0/ /except /anyName /attribute /zeroOrMore choice ref name=config/ text/ /choice /element /zeroOrMore /define That is, to allow any configuration content. If we make it too restrictive, what about custom components setup?. What do you think about this? David * Este correo ha sido procesado por el Antivirus del Grupo FCC. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ant static generation - class not found DOMError
Hi, I am trying to use the cocoon ant task to generate a static website. The error I am getting is: NoClassDefFound: org.w3c.dom.DOMError. Guessing that it should be in xml-apis.jar and checking, I found that the class, indeed, doesn't exist. Not in the lastest xml-apis.jar from CVS, either, though. What do I need to replace? Thanks a lot Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RegexpURIMatcher problem
On Thu, 2004-04-29 at 12:37, Jakob Fix wrote: Hi, I cannot find any examples for using regular expressions in a map:match section of the sitemap. I want to match three types of URLs that are different only by one fragment, i.e.: map:match pattern=db/*/*/toc/*.xml map:match pattern=db/*/*/lot/*.xml map:match pattern=db/*/*/lof/*.xml There is a fourth URL type which is to be handled differently: map:match pattern=db/*/*/doc/*.xml I thought I could reduce the three first pipelines into one by doing something like this: map:match type=regexp pattern=db/*/*/[toc|lof|lot]/*.xml But I don't know how to reference the regex match in the generator. You need to put ( ) around the parts you want to reference. What you wrote above isn't a regular expression though, try something like: map:match type=regexp pattern=db/(.*)/(.*)/(toc|lof|lot)/(.*).xml A helping hand or a link to examples of the usage of RegexpURIMatcher would be greatly appreciated. Also, is the regex matcher very costly in comparison to the wildcard matcher? haven't ever tested it. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some Flow functions not found
On Thu, 2004-04-29 at 12:14, John L. Webber wrote: We're using Cocoon 2.1.3, and have been integrating Flowscript into our project over the last several weeks. Today, when trying to use the functions cocoon.createPageLocal(), cocoon.createWebContinuation() and cocoon.sendStatus () I get an exception because the functions are unknown. The stack trace is below. Are these functions not available in Cocoon 2.1.3, or do we have some classpath problem? You guessed correctly, they are new in 2.1.4 -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some Flow functions not found
John L. Webber wrote: We're using Cocoon 2.1.3, and have been integrating Flowscript into our project over the last several weeks. Today, when trying to use the functions cocoon.createPageLocal(), cocoon.createWebContinuation() and cocoon.sendStatus () I get an exception because the functions are unknown. The stack trace is below. Are these functions not available in Cocoon 2.1.3, or do we have some classpath problem? Looking at: http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java?annotate=1.33 I can see that createPageLocal was added in version 1.27. Looking at: http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java tells me that 1.27 of that file was included in 2.1.4. So, I'd try it out with Cocoon 2.1.4 and see whether it works. But this does mean that it won't work with 2.1.3. HTH. Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing non-xhtml tags from a string ???
I use nekoHTML for parsing HTML and building DOM from HTML input instead of JTidy for about six months. It allows to set a chain of filters which are performed on the document after parsing. One of the filters is the filter ElementRemover that removes from document or keeps elements specified. I don't know if it would really help, but you might try using CyberNeko [1] instead of JTidy. I've found it gives better results on average, particularly when dealing with [so-called] HTML pasted from Word. Ugo [1] http://www.apache.org/~andyc/neko/doc/html/ MO I must admit, that CyberNeko looks interesting :-) MO Regards, MO Marcin Okraszewski MO - MO To unsubscribe, e-mail: [EMAIL PROTECTED] MO For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Peter Velychko [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sitemap.java
Hi all, Where can I find the generated sitemap.java in order to debug some problems I have? In Cocoon 2.0.4 I could find it in the configured work directory of my servlet. Thanks for any help. David. * Este correo ha sido procesado por el antivirus del Grupo FCC. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ant static generation - class not found DOMError
Stefan Klein wrote: Hi, I am trying to use the cocoon ant task to generate a static website. The error I am getting is: NoClassDefFound: org.w3c.dom.DOMError. Guessing that it should be in xml-apis.jar and checking, I found that the class, indeed, doesn't exist. Not in the lastest xml-apis.jar from CVS, either, though. What do I need to replace? Does it work with the CLI instead of the ant task? Are you using org.apache.cocoon.CocoonTask? (There's an older one in the scratchpad which I'll remove soon). Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RegexpURIMatcher problem
Thanks Bruno, that did the trick. A little trial and error showed also that the {1} ... placeholders can be used in the same way as for the wildcard matcher. This is logical, but wasn't explicited anywhere I looked. thanks again, Jakob. Bruno Dumon said: On Thu, 2004-04-29 at 12:37, Jakob Fix wrote: Hi, I cannot find any examples for using regular expressions in a map:match section of the sitemap. I want to match three types of URLs that are different only by one fragment, i.e.: map:match pattern=db/*/*/toc/*.xml map:match pattern=db/*/*/lot/*.xml map:match pattern=db/*/*/lof/*.xml There is a fourth URL type which is to be handled differently: map:match pattern=db/*/*/doc/*.xml I thought I could reduce the three first pipelines into one by doing something like this: map:match type=regexp pattern=db/*/*/[toc|lof|lot]/*.xml But I don't know how to reference the regex match in the generator. You need to put ( ) around the parts you want to reference. What you wrote above isn't a regular expression though, try something like: map:match type=regexp pattern=db/(.*)/(.*)/(toc|lof|lot)/(.*).xml A helping hand or a link to examples of the usage of RegexpURIMatcher would be greatly appreciated. Also, is the regex matcher very costly in comparison to the wildcard matcher? haven't ever tested it. -- Bruno Dumon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some Flow functions not found
OK, thanks Bruno -- we're in the midst of a final deployment phase, so I guess I'll have to wait till after we've gone live and we can update to 2.1.4 (or whatever the current version by then is ;-) ). John Bruno Dumon wrote: On Thu, 2004-04-29 at 12:14, John L. Webber wrote: We're using Cocoon 2.1.3, and have been integrating Flowscript into our project over the last several weeks. Today, when trying to use the functions cocoon.createPageLocal(), cocoon.createWebContinuation() and cocoon.sendStatus () I get an exception because the functions are unknown. The stack trace is below. Are these functions not available in Cocoon 2.1.3, or do we have some classpath problem? You guessed correctly, they are new in 2.1.4 -- - Jentro Technologies GmbH John L. Webber, Software Development - Rosenheimer Str. 145e 81671 München Tel. +49 89 189 169 80 mailto:[EMAIL PROTECTED] Fax +49 89 189 169 99 http://www.jentro.com - NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antw: Re: ant static generation - class not found DOMError
Hello Stefan, I think I had a similar problem while using cocoon as a Ant task. Form my Ant(1.6.1) installation I copied the ant.bat file to myant.bat and inserted the following line somwhere at the beginning ot this bat-file SET ANT_OPTS=-Djava.endorsed.dirs=D:\cocoon-2.1.4-src\cocoon-2.1.4\lib\endorsed -Xms64m -Xmx512m As you see I work on Windows 2000 with JDK 1.4.2 hth Martin [EMAIL PROTECTED] Donnerstag, 29. April 2004 14:06:12 Stefan Klein wrote: Hi, I am trying to use the cocoon ant task to generate a static website. The error I am getting is: NoClassDefFound: org.w3c.dom.DOMError. Guessing that it should be in xml-apis.jar and checking, I found that the class, indeed, doesn't exist. Not in the lastest xml-apis.jar from CVS, either, though. What do I need to replace? Does it work with the CLI instead of the ant task? Are you using org.apache.cocoon.CocoonTask? (There's an older one in the scratchpad which I'll remove soon). Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LDAPTransformer error.
Hello, When I use LDAPTransformer (cocoon 2.1.4), I obtained ClassCastException when I try to pass byte array to recodeFromLDAPEncoding((String) vals.nextElement()). Attribute password was represented as a byte array. I changed the code in the LDAPTransformer to recodeFromLDAPEncoding((String) vals.nextElement().toString()). Is there any other (better) solution for this problem? Thank you for answer Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegexpURIMatcher problem
Have you looked at the Cocoon wiki? There is a lot of useful documentation. -Mensaje original- De: Jakob [mailto:[EMAIL PROTECTED] Enviado el: jueves, 29 de abril de 2004 14:14 Para: [EMAIL PROTECTED] Asunto: Re: RegexpURIMatcher problem Thanks Bruno, that did the trick. A little trial and error showed also that the {1} ... placeholders can be used in the same way as for the wildcard matcher. This is logical, but wasn't explicited anywhere I looked. thanks again, Jakob. Bruno Dumon said: On Thu, 2004-04-29 at 12:37, Jakob Fix wrote: Hi, I cannot find any examples for using regular expressions in a map:match section of the sitemap. I want to match three types of URLs that are different only by one fragment, i.e.: map:match pattern=db/*/*/toc/*.xml map:match pattern=db/*/*/lot/*.xml map:match pattern=db/*/*/lof/*.xml There is a fourth URL type which is to be handled differently: map:match pattern=db/*/*/doc/*.xml I thought I could reduce the three first pipelines into one by doing something like this: map:match type=regexp pattern=db/*/*/[toc|lof|lot]/*.xml But I don't know how to reference the regex match in the generator. You need to put ( ) around the parts you want to reference. What you wrote above isn't a regular expression though, try something like: map:match type=regexp pattern=db/(.*)/(.*)/(toc|lof|lot)/(.*).xml A helping hand or a link to examples of the usage of RegexpURIMatcher would be greatly appreciated. Also, is the regex matcher very costly in comparison to the wildcard matcher? haven't ever tested it. -- Bruno Dumon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * Este correo ha sido procesado por el Antivirus del Grupo FCC. * * Este correo ha sido procesado por el Antivirus del Grupo FCC. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Woody - Submit widget - ConfirmationBox
Dear All, Is there a way with a submit widget or action widget to ask on the client side a confirmation and execute the action only if the user reply Yes Ex : [ Delete ] == when user click : Are you sure you want to delete ? == If yes call Flow Script == If no call nothing Thx
Re: how to pass XSL param to stylesheet from sitemap
Here is what come from the simple installation In the Site map : map:transform src="">context://stylesheets/system/error2html.xslt map:parameter name=contextPath value={request:contextPath}/ map:parameter name=pageTitle value=Resource not found/ /map:transform Then in the error2html.xslt file xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:error=http://apache.org/cocoon/error/2.1 xsl:param name=contextPath select=string('/cocoon')/ !-- let sitemap override default page title -- xsl:param name=pageTitle select=//error:notify/error:title/ xsl:template match=error:notify ... and it works Laurent Terence Kearns [EMAIL PROTECTED] 29/04/2004 11:18 Please respond to users To: [EMAIL PROTECTED] cc: Subject: how to pass XSL param to stylesheet from sitemap Basically I want to pass the matched pattern in {1} as the content of an XSL parameter to whatever stylesheet I am using. Is this possible? Thanks for any help. -- Terence Kearns ph: +61 2 6201 5516 Enterprise Applications Developer Enterprise Systems Support and Development Information and Communications Technology (ICT) Services University of Canberra, Australia - http://www.canberra.edu.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
continuation question
Hi all! Who can to explain to me continuation life cycle. What happend after form performing finished? Continuation cashed? For example: after filing form validation failed and cocoon return form page (http://xyz.12312.count) and user put it bookmark and closed session. After some days he will click on bookmark.. what happen? Page will not found or not? How i can to set redirecting to first form page if continuation is not exist? Sorry if my question are simple/ I'm newbie in cocoon and don't understand english very well/ thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RegexpURIMatcher problem
Carmona Perez, David DPerezCar at fcc.es writes: Have you looked at the Cocoon wiki? There is a lot of useful documentation. you bet I did. a search for RegexpURIMatcher [1] found one hit, the page about Matcher [2], where there's just one example. it seems to me that people rarely use the regex matcher, and are happy with the wildcard matcher. but you're right when you suggest I should contribute my solution to the wiki. I will. cheers, Jakob. [1] http://wiki.cocoondev.org/Search.jsp?query=RegexpURIMatcher [2] http://wiki.cocoondev.org/Wiki.jsp?page=Matcher - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RegexpURIMatcher problem
I use it a lot, and is quite powerful, but sometimes the expressions can become quite complicated. Me myself often add or complete content to the wiki, when something important is missing. It's very easy to do so. Another resource I use it's the source code. With tools like Eclipse is very easy to browse through 3rd party code. -Mensaje original- De: news [mailto:[EMAIL PROTECTED] nombre de Jakob Fix Enviado el: jueves, 29 de abril de 2004 15:43 Para: [EMAIL PROTECTED] Asunto: Re: RegexpURIMatcher problem Carmona Perez, David DPerezCar at fcc.es writes: Have you looked at the Cocoon wiki? There is a lot of useful documentation. you bet I did. a search for RegexpURIMatcher [1] found one hit, the page about Matcher [2], where there's just one example. it seems to me that people rarely use the regex matcher, and are happy with the wildcard matcher. but you're right when you suggest I should contribute my solution to the wiki. I will. cheers, Jakob. [1] http://wiki.cocoondev.org/Search.jsp?query=RegexpURIMatcher [2] http://wiki.cocoondev.org/Wiki.jsp?page=Matcher - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * Este correo ha sido procesado por el Antivirus del Grupo FCC. * * Este correo ha sido procesado por el Antivirus del Grupo FCC. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sitemap-v06.rng
Hi, Carmona Perez, David [EMAIL PROTECTED] writes: I propose to change the RelaxNG validation file sitemap-v06.rng in this way: Component declaration like map:generator, map:transformer, map:serializer, and similars would need to be: [Snipped concrete implementation] That is, to allow any configuration content. If we make it too restrictive, what about custom components setup?. I use sitemap-v06.rng for editing the sitemap with oxygen and I like it to be very restrictive. So I do not always have to look into the docu to see how a configuration looks exactly. I do change the sitemap quite often but do not write new components very often, especially compontents which need additional configuration elements. Adapting sitemap-v06.rng once in a while is a low price for good sitemap editing support. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sitemap.java
Carmona Perez, David wrote: Hi all, Where can I find the generated sitemap.java in order to debug some problems I have? In Cocoon 2.0.4 I could find it in the configured work directory of my servlet. You won't -- in 2.1.x the sitemap is not compiled to java code anymore. Instead, the result of parsing the file (and setting some things up) is kept in memory for interpreted excecution. (It's in the o.a.c.components.treeprocessor package in case you'd like to browse the sources). Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sitemap-v06.rng
Hi, I also use it for editing and validating with XMLBuddy and Eclipse. At least there should be some extension mechanism for custom components. -Mensaje original- De: news [mailto:[EMAIL PROTECTED] nombre de Martin Holz Enviado el: jueves, 29 de abril de 2004 16:17 Para: [EMAIL PROTECTED] Asunto: Re: sitemap-v06.rng Hi, Carmona Perez, David [EMAIL PROTECTED] writes: I propose to change the RelaxNG validation file sitemap-v06.rng in this way: Component declaration like map:generator, map:transformer, map:serializer, and similars would need to be: [Snipped concrete implementation] That is, to allow any configuration content. If we make it too restrictive, what about custom components setup?. I use sitemap-v06.rng for editing the sitemap with oxygen and I like it to be very restrictive. So I do not always have to look into the docu to see how a configuration looks exactly. I do change the sitemap quite often but do not write new components very often, especially compontents which need additional configuration elements. Adapting sitemap-v06.rng once in a while is a low price for good sitemap editing support. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * Este correo ha sido procesado por el Antivirus del Grupo FCC. * * Este correo ha sido procesado por el Antivirus del Grupo FCC. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to do that with XSP ?
Dear All, How can I do that in XSP : input type=button name=but_delete class=button id=but_delete xsp:attribute name=value i18n:text key=blablaThis is what I want to translate/i18n:text /xsp:attribute /input ??? I want to translate the attribute ! Any idea ? Laurent
cache question
Hi, I have a map:transform in a map:resource. I made a change to the stylesheet named in the transform's @src, but it had no effect I would refresh the page in my browser and see no difference. Finally I figured out that my change was not the problem... apparently something is getting cached and not invalidated (either a pipeline result or the stylesheet itself I don't fully understand how Cocoon's caching works in detail, just a little). When I restarted Cocoon, my change took effect. Can somebody explain this to me? Do I have something set up wrong? And is there something I can do to straighten things out when this happens, short of restarting the application? Thanks, mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Aggregation problem in subsitemap
Hello! I have a problem with the map:aggregate using a subsitemap. My subsitemap contains this section: map:match pattern=testagg.html map:aggregate element=merged map:part src=cocoon:/getA/ map:part src=cocoon:/getB/ /map:aggregate map:serialize type=xml/ /map:match map:match pattern=getA map:generate src=http://localhost/testfileA.xml/ /map:match map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match I want to use the different matchers because of flexible generators possible, as I can't use a generator element as a child of map:aggregate. If I want to access to testagg.html page, I get the error message No pipeline matched request: work/getAWith work is my subsitemap mount point in the main sitemap.Any ideas how I can use the cocoon protocol, subsitemaps, aggregation together?Thanks in advance.Regards,Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Aggregation problem in subsitemap
Hi, If i understand your problem correct you should use map:mount to your work folder like: map:match pattern=work/** map:mount src=work/sitemap.xmap uri-prefix=work/ /map:match Greetz, Jeroen Reijn -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Posted At: Thursday, April 29, 2004 6:56 PM Posted To: Cocoon User List Conversation: Aggregation problem in subsitemap Subject: Aggregation problem in subsitemap Hello! I have a problem with the map:aggregate using a subsitemap. My subsitemap contains this section: map:match pattern=testagg.html map:aggregate element=merged map:part src=cocoon:/getA/ map:part src=cocoon:/getB/ /map:aggregate map:serialize type=xml/ /map:match map:match pattern=getA map:generate src=http://localhost/testfileA.xml/ /map:match map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match I want to use the different matchers because of flexible generators possible, as I can't use a generator element as a child of map:aggregate. If I want to access to testagg.html page, I get the error message No pipeline matched request: work/getAWith work is my subsitemap mount point in the main sitemap.Any ideas how I can use the cocoon protocol, subsitemaps, aggregation together?Thanks in advance.Regards,Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Aggregation problem in subsitemap
Hi Jeroen! No, the mounting of the subsitemap works quite good. Can call every page in subsitemap within http://localhost/cocoon/work/ mountpoint. The problem is in the content aggregation of the subsitemap. It cannot find the matcher. I tried to use map:part src=cocoon://getA/ but also without any success. Any other ideas? Christian - Original Message - From: Jeroen Reijn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 29, 2004 7:07 PM Subject: RE: Aggregation problem in subsitemap Hi, If i understand your problem correct you should use map:mount to your work folder like: map:match pattern=work/** map:mount src=work/sitemap.xmap uri-prefix=work/ /map:match Greetz, Jeroen Reijn -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Posted At: Thursday, April 29, 2004 6:56 PM Posted To: Cocoon User List Conversation: Aggregation problem in subsitemap Subject: Aggregation problem in subsitemap Hello! I have a problem with the map:aggregate using a subsitemap. My subsitemap contains this section: map:match pattern=testagg.html map:aggregate element=merged map:part src=cocoon:/getA/ map:part src=cocoon:/getB/ /map:aggregate map:serialize type=xml/ /map:match map:match pattern=getA map:generate src=http://localhost/testfileA.xml/ /map:match map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match I want to use the different matchers because of flexible generators possible, as I can't use a generator element as a child of map:aggregate. If I want to access to testagg.html page, I get the error message No pipeline matched request: work/getAWith work is my subsitemap mount point in the main sitemap.Any ideas how I can use the cocoon protocol, subsitemaps, aggregation together?Thanks in advance.Regards,Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Aggregation problem in subsitemap
Hi, looking at it again. I see something else: map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match You need to define your serializer. What happens if your request the getB or getA directly. Does this give you any content? Jeroen -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Posted At: Thursday, April 29, 2004 7:12 PM Posted To: Cocoon User List Conversation: Aggregation problem in subsitemap Subject: Re: Aggregation problem in subsitemap Hi Jeroen! No, the mounting of the subsitemap works quite good. Can call every page in subsitemap within http://localhost/cocoon/work/ mountpoint. The problem is in the content aggregation of the subsitemap. It cannot find the matcher. I tried to use map:part src=cocoon://getA/ but also without any success. Any other ideas? Christian - Original Message - From: Jeroen Reijn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 29, 2004 7:07 PM Subject: RE: Aggregation problem in subsitemap Hi, If i understand your problem correct you should use map:mount to your work folder like: map:match pattern=work/** map:mount src=work/sitemap.xmap uri-prefix=work/ /map:match Greetz, Jeroen Reijn -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Posted At: Thursday, April 29, 2004 6:56 PM Posted To: Cocoon User List Conversation: Aggregation problem in subsitemap Subject: Aggregation problem in subsitemap Hello! I have a problem with the map:aggregate using a subsitemap. My subsitemap contains this section: map:match pattern=testagg.html map:aggregate element=merged map:part src=cocoon:/getA/ map:part src=cocoon:/getB/ /map:aggregate map:serialize type=xml/ /map:match map:match pattern=getA map:generate src=http://localhost/testfileA.xml/ /map:match map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match I want to use the different matchers because of flexible generators possible, as I can't use a generator element as a child of map:aggregate. If I want to access to testagg.html page, I get the error message No pipeline matched request: work/getAWith work is my subsitemap mount point in the main sitemap.Any ideas how I can use the cocoon protocol, subsitemaps, aggregation together?Thanks in advance.Regards,Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Woody - Submit widget - ConfirmationBox
On 29.04.2004 15:02, [EMAIL PROTECTED] wrote: Dear All, Is there a way with a submit widget or action widget to ask on the client side a confirmation and execute the action only if the user reply Yes Ex : [ Delete ] == when user click : Are you sure you want to delete ? == If yes call Flow Script == If no call nothing Where is the problem? It's just client side java script, no Woody/Cocoon/backend in general involved. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP Generator question
Hi, Is it possible to avoid a JSP page to be reloaded and recompiled using the JSPGenerator in Cocoon when the file has been changed on filesystem ? The Tomcat settings seem to be ignored but perhaps it is normal because the JSPEngine object is created by Cocoon. Any ideas ? Thanks a lot, Eddy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Generator question
On 29.04.2004 19:50, Eddy Fras wrote: Is it possible to avoid a JSP page to be reloaded and recompiled using the JSPGenerator in Cocoon when the file has been changed on filesystem ? Don't you mean until the file has been changed on filesystem? The Tomcat settings seem to be ignored but perhaps it is normal because the JSPEngine object is created by Cocoon. Any ideas ? Both the JSPGenerator and JSPReader could implement CacheableProcessingComponent, what they don't do at the moment. It would be the same as in the FileGenerator. Is it what you want? Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
flowscript iterator JXT
Hi, I have some java iteration code which I wish to convert into flowscript. I have imported the Iterator: importClass(Packages.java.util.Iterator); and the java code I want to convert is: Iterator i = OrderItems.iterator(); while (i.hasNext()) { OrderItem item = (OrderItem) i.next(); } Any help will be most appreciated. Peter
Re: flowscript iterator JXT
beyaNet Consultancy wrote: Hi, I have some java iteration code which I wish to convert into flowscript. I have imported the Iterator: importClass(Packages.java.util.Iterator); and the java code I want to convert is: Iterator i = OrderItems.iterator(); while (i.hasNext()) { OrderItem item = (OrderItem) i.next(); } I'm no Javascript guru, but: var i = OrderItems.iterator(); while (i.hasNext()) { var item = i.next(); ... } Simple as that. No need to import java.util.Iterator. Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Generator question
On 29.04.2004 19:50, Eddy Fras wrote: Is it possible to avoid a JSP page to be reloaded and recompiled using the JSPGenerator in Cocoon when the file has been changed on filesystem ? Don't you mean until the file has been changed on filesystem? No, I'd like to completely avoid having the JSPGenerator checking if the jsp file has changed. So, even if the file has been changed on filesystem, I would like to have the jsp not recompiled. The Tomcat settings seem to be ignored but perhaps it is normal because the JSPEngine object is created by Cocoon. Any ideas ? Both the JSPGenerator and JSPReader could implement CacheableProcessingComponent, what they don't do at the moment. It would be the same as in the FileGenerator. So I could write my own JSPGenerator, just adding the CacheableProcessingComponent interface implementation and that would be enough ? Thanks Joerg, Eddy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Generator question
On 29.04.2004 21:29, Eddy Fras wrote: Is it possible to avoid a JSP page to be reloaded and recompiled using the JSPGenerator in Cocoon when the file has been changed on filesystem ? Don't you mean until the file has been changed on filesystem? No, I'd like to completely avoid having the JSPGenerator checking if the jsp file has changed. So, even if the file has been changed on filesystem, I would like to have the jsp not recompiled. Hmm, ok, but what exactly is the use case? So I could write my own JSPGenerator, just adding the CacheableProcessingComponent interface implementation and that would be enough ? Yes, just extend the existing one. But unlike the FileGenerator in getValidity() you must not return the validity of the inputsource (which is normally the lastmodified value), but the always valid validity: http://cvs.apache.org/viewcvs.cgi/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/validity/NOPValidity.java Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP Generator question
On 29.04.2004 21:29, Eddy Fras wrote: Is it possible to avoid a JSP page to be reloaded and recompiled using the JSPGenerator in Cocoon when the file has been changed on filesystem ? Don't you mean until the file has been changed on filesystem? No, I'd like to completely avoid having the JSPGenerator checking if the jsp file has changed. So, even if the file has been changed on filesystem, I would like to have the jsp not recompiled. Hmm, ok, but what exactly is the use case? I realize it is quite strange but it is in a performance test environment and we don't want to take jsp file modifications into account. So I could write my own JSPGenerator, just adding the CacheableProcessingComponent interface implementation and that would be enough ? Yes, just extend the existing one. But unlike the FileGenerator in getValidity() you must not return the validity of the inputsource (which is normally the lastmodified value), but the always valid validity: http://cvs.apache.org/viewcvs.cgi/avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/validity/NOPValidity.java I'll try that, thanks a lot, Eddy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Woody - Submit widget - ConfirmationBox
On Thu, 2004-04-29 at 19:37, Joerg Heinicke wrote: On 29.04.2004 15:02, [EMAIL PROTECTED] wrote: Dear All, Is there a way with a submit widget or action widget to ask on the client side a confirmation and execute the action only if the user reply Yes Ex : [ Delete ] == when user click : Are you sure you want to delete ? == If yes call Flow Script == If no call nothing Where is the problem? It's just client side java script, no Woody/Cocoon/backend in general involved. Well, the script still has to come from the server side. I even think this might be a common enough case to support it in the default stylesheets. Something like: fi:styling show-confirmationAre you sure?/show-confirmation /fi:styling -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Aggregation problem in subsitemap
Thanks, the serializer was missing. Stupid mistake... ;-) No, direct content. Regards, Christian - Original Message - From: Jeroen Reijn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 29, 2004 7:19 PM Subject: RE: Aggregation problem in subsitemap Hi, looking at it again. I see something else: map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match You need to define your serializer. What happens if your request the getB or getA directly. Does this give you any content? Jeroen -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Posted At: Thursday, April 29, 2004 7:12 PM Posted To: Cocoon User List Conversation: Aggregation problem in subsitemap Subject: Re: Aggregation problem in subsitemap Hi Jeroen! No, the mounting of the subsitemap works quite good. Can call every page in subsitemap within http://localhost/cocoon/work/ mountpoint. The problem is in the content aggregation of the subsitemap. It cannot find the matcher. I tried to use map:part src=cocoon://getA/ but also without any success. Any other ideas? Christian - Original Message - From: Jeroen Reijn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 29, 2004 7:07 PM Subject: RE: Aggregation problem in subsitemap Hi, If i understand your problem correct you should use map:mount to your work folder like: map:match pattern=work/** map:mount src=work/sitemap.xmap uri-prefix=work/ /map:match Greetz, Jeroen Reijn -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Posted At: Thursday, April 29, 2004 6:56 PM Posted To: Cocoon User List Conversation: Aggregation problem in subsitemap Subject: Aggregation problem in subsitemap Hello! I have a problem with the map:aggregate using a subsitemap. My subsitemap contains this section: map:match pattern=testagg.html map:aggregate element=merged map:part src=cocoon:/getA/ map:part src=cocoon:/getB/ /map:aggregate map:serialize type=xml/ /map:match map:match pattern=getA map:generate src=http://localhost/testfileA.xml/ /map:match map:match pattern=getB map:generate src=http://localhost/testfileB.xml/ /map:match I want to use the different matchers because of flexible generators possible, as I can't use a generator element as a child of map:aggregate. If I want to access to testagg.html page, I get the error message No pipeline matched request: work/getAWith work is my subsitemap mount point in the main sitemap.Any ideas how I can use the cocoon protocol, subsitemaps, aggregation together?Thanks in advance.Regards,Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
usage statistics
Hello, can anyone tell me how to get statistics about the usage of a cocoon webapp running on tomcat? I couldnt find any hint on google, Thank you, Jasper Michalczik
Re: Woody - Submit widget - ConfirmationBox
On Thu, Apr 29, 2004 at 10:19:32PM +0200, Bruno Dumon wrote: On Thu, 2004-04-29 at 19:37, Joerg Heinicke wrote: On 29.04.2004 15:02, [EMAIL PROTECTED] wrote: Is there a way with a submit widget or action widget to ask on the client side a confirmation and execute the action only if the user reply Yes Ex : [ Delete ] == when user click : Are you sure you want to delete ? == If yes call Flow Script == If no call nothing Where is the problem? It's just client side java script, no Woody/Cocoon/backend in general involved. Well, the script still has to come from the server side. I even think this might be a common enough case to support it in the default stylesheets. Something like: fi:styling show-confirmationAre you sure?/show-confirmation /fi:styling +1 This would be very handy. --Tim Larson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: usage statistics
I don't know that there are any. I recently submitted a patch that allows you to register a RequestListener. I am using it to capture statistics and present them via JMX as Open MBeans. Unfortunately, this is done through our own proprietary framework that sits on top of the MBean spec so I can't submit that code. Ralph -Original Message- From: Jasper Michalczik [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 1:33 PM To: [EMAIL PROTECTED] Subject: usage statistics Hello, can anyone tell me how to get statistics about the usage of a cocoon webapp running on tomcat? I couldn't find any hint on google, Thank you, Jasper Michalczik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: usage statistics
I use Apache together with Webalizer to get my statistics, even from a Cocoon site. I use ProxyPass and ProxyPassReverse to pass from Apache to Cocoon. Eg. Look at www.belgium-explorer.be - complete site in cocoon look at www.belgium-explorer.be/stats/index.html - stats on this using webalizer On 29 Apr 2004, at 22:33, Jasper Michalczik wrote: Hello, can anyone tell me how to get statistics about the usage of a cocoon webapp running on tomcat? I couldnt find any hint on google, Thank you, Jasper Michalczik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deli version
Hi all, Does anyone knows the difference between the 0.9.8b release of DELI available on the project website and the 0.9.8 release packaged with Cocoon 2.1.4 ? There is no note about the 0.9.8 build on the sourceforge page. Thanks, Eddy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hibernate logging in cocoon?
Is there a way to enable hibernate logging within cocoon? I've tried putting log4j.properties in the classpath but get nothing. THanks. joel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hibernate logging in cocoon?
Yep, i have log4j-1.2.7.jar in both web-inf/lib and web-inf/classes Peter On 29 Apr 2004, at 23:53, Joel McConaughy wrote: Is there a way to enable hibernate logging within cocoon? I've tried putting log4j.properties in the classpath but get nothing. THanks. joel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems displaying image on the browser
On 29.04.2004 18:16, [EMAIL PROTECTED] wrote: We are trying to display image on the IE. The problem is that we are forced to specify the absolute path of the image, whereas the requirement is to specify the relative path. On the browser the the foll URL is typed for displaying the html page. http://localhost:8080/cocoon/mointest/helloworld.html . Though your text is clear I do not really understand. Are you saying that you see the picture in the browser when specifying D:\jboss-3.2.3\... as URL of the image? That's impossible - or it's grabbed locally, but not from the server. From your code it should be easily picture file=images/eagle.jpg/ Of course you need an appropriate matcher in your sitemap, something like map:match pattern=images/*.jpg map:read src={0} mime-type=image/jpg/ /map:match Joerg The following is the code snippet for the XML file ?xml version=1.0? page titleHello/title content paragraphHello Worldparagraph /content picture file=D:\jboss-3.2.3\server\default\deploy\cocoon.war\mointest\images\eagle.jpg/ /page The following is the code in the XSL file ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=picture img xsl:attribute name=src xsl:value-of select=@file/ /xsl:attribute /img xsl:apply-templates/ /xsl:template xsl:template match=content xsl:apply-templates/ h1xsl:apply-templates select=*//h1 /xsl:template xsl:template match=paragraph table border='1' tr td align='center' xsl:apply-templates/ /td /tr /table /xsl:template /xsl:stylesheet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to do that with XSP ?
On 29.04.2004 17:10, [EMAIL PROTECTED] wrote: Dear All, How can I do that in XSP : input type=button name=but_delete class=button id=but_delete xsp:attribute name=value i18n:text key=blablaThis is what I want to translate/i18n:text /xsp:attribute /input ??? I want to translate the attribute ! Any idea ? This has nothing to do with XSP. YOu just need the correct syntax for the i18n transformer: input value=blabla i18n:attr=value/ The value of @value will be taken as key and replaced accordingly. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: continuation question
On 29.04.2004 15:40, Vlad Ali wrote: Hi all! Who can to explain to me continuation life cycle. What happend after form performing finished? Continuation cashed? For example: after filing form validation failed and cocoon return form page (http://xyz.12312.count) and user put it bookmark and closed session. After some days he will click on bookmark.. what happen? Page will not found or not? How i can to set redirecting to first form page if continuation is not exist? Sorry if my question are simple/ I'm newbie in cocoon and don't understand english very well/ A continuation is timed-out similar like a session. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LDAPTransformer error.
On 29.04.2004 15:05, grofcik.lan wrote: Hello, When I use LDAPTransformer (cocoon 2.1.4), I obtained ClassCastException when I try to pass byte array to recodeFromLDAPEncoding((String) vals.nextElement()). Attribute password was represented as a byte array. I changed the code in the LDAPTransformer to recodeFromLDAPEncoding((String) vals.nextElement().toString()). Is there any other (better) solution for this problem? No, looks like a valuable solution. But I'm not familiar with LDAP. Where does the byte array come from? Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sitemap.java
On 29.04.2004 16:51, Christian Haul wrote: Hi all, Where can I find the generated sitemap.java in order to debug some problems I have? In Cocoon 2.0.4 I could find it in the configured work directory of my servlet. You won't -- in 2.1.x the sitemap is not compiled to java code anymore. Äh, 2.0.4 vs 2.1.x ?? Unfortunately I can not really help, David, because when I searched for the sitemap source I always found it in the work directory. But you might switch to the interpreted sitemap already in 2.0.4. It's faster and better. We have a system running in production since a year with 2.0.4 and interpreted sitemap. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sitemap-v06.rng
On 29.04.2004 17:00, Carmona Perez, David wrote: Hi, I also use it for editing and validating with XMLBuddy and Eclipse. At least there should be some extension mechanism for custom components. Not only custom components, but all Configurable components need this non-restrictive validation. I think i18n transformer is a sample for this. Had a quick look, it is: http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/transformation/I18nTransformer.java?annotate=1.25#935 Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [woody / cforms] woody-lib.js causes delay
On 29.04.2004 11:16, Niels van Kampenhout wrote: Hello list, In the case of a very large Woody form, it takes a lot of time (up to seconds) before a check (dis)appears in a checkbox after the user clicks in it. The same happens with radio buttons. It seems that this is caused by Woody's javascript code in woody-lib.js, since the problem does not occur when woody-lib.js is disabled. There is not a lot of code in woody-lib.js, however I cannot see what causes the delay. What happens when a checkbox is (un)checked? The delay is rather annoying for users filling out the form. Does anyone have a solution or workaround for this problem? Per default no event listener seems to be attached to checkboxes. So in theory there should be no interaction with Javascript. Do you have added any @on* in your code or is it just a plain checkbox?? Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon, XML:DB and custom generator problem
On 28.04.2004 17:58, Christian Rosenberger wrote: The result is in a XMLResource instance. Part of my custom generator code: this.contentHandler.startDocument(); for (long i = 0; i result.getSize(); i++) { resource = (XMLResource) result.getResource(i); resource.getContentAsSAX(this.contentHandler); } this.contentHandler.endDocument(); So I have two results in my ResourceSet. (one for each user). I am browsing these results and for each XMLResource in the ResourceSet I call the getContentAsSax method. The result is a nonvalid XML document with two ?xml.. tags: Is only the XML declaration the problem or are there more, e.g. multiple root elements? Any ideas what is going wrong in my Java code? Tried to call the startElement method after calling the startDocument, but have also no success with it! Don't understand the last sentence. You might need to put another ContentHandler into the pipe that just ignores startDocument() and endDocument(): ContentHandler myContentHandler = new MyContentHandler(this.contentHandler); this.contentHandler.startDocument(); for (long i = 0; i result.getSize(); i++) { resource = (XMLResource) result.getResource(i); resource.getContentAsSAX(myContentHandler); } this.contentHandler.endDocument(); private class MyContentHandler implements ContentHandler { private ContentHandler ch; MyContentHandler(ContentHandler ch) { this.ch = ch; } startDocument() { //ignore } endDocument() { //ignore } allOtherMethodsFromContentHandler() { this.ch.allOtherMethodsFromContentHandler(); } } Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
can woody form definition be dynamically created from another pipeline new form(Url/to/another/pipleine) ??
I want to create a woody form whose definition iscreated dynamicly by another pipeline. the following sentencein woody2.jsreads form definition from a static file. var form=new Form(cocoon.paprameters["form-definition"]); Itried tochange the value of"form-defnition" to a url matched by another pipeline, but it doesn't work. every time there is "file not found error" it seems that this form cons So would anybody tell me if cocoon's form can only be created from a static file or there is some method to create it dynamically? Thanks
Best way to merge two xml files
(Subject line of my post may be misleading.) What I'm trying to do is, when XSL processing of foo.xml is taking place, when a certain element is encountered in foo.xml, I want to insert content from someotherdocument.xml. It appears that the XSLT function document() does this. Is this the best way? [I realize that aggregate sounds like it should do the trick, however, aggregate appears to require a priori knowledge of how many documents to aggregate, that is, when creating the sitemap you have to know in advance that you're going to don aggregations. In my case, however, I don't know how often I'm going to have to merge other xml documents when processing the main document.] Hope that made sense. David
Re: cocoon forms - flow custom validator
Thanks very much for your help there. This is exactly what I was looking for. However, the snippets you have provided don't seem to work on my installation. this is what I have: form.getWidget().addValidator(newValidator(function(widget) { var loginWidget = widget.getWidget(login); if( loginWidget.getValue() == test ) { var validationError = new Packages.org.apache.cocoon.forms.validation.ValidationError(login taken.); loginWidget.setValidationError( validationError ); return true; } return false; })); gets completely ignored when it comes to validation. if I add the validator to the widget I want to validate directly, like form.getWidget(login).addValidator(newValidator(function(widget) { I get the following exception: Original Exception: TypeError: Cannot convert null to an object. (resource://org/apache/cocoon/forms/flow/javascript/Form.js; line 115) at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:581) at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:541) at org.mozilla.javascript.NativeGlobal.typeError0(NativeGlobal.java:546) at org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:497) at org.mozilla.javascript.JavaAdapter.toObject(JavaAdapter.java:401) at adapter0.validate(adapter) at org.apache.cocoon.forms.formmodel.AbstractWidget.validate(AbstractWidget.jav a:215) at org.apache.cocoon.forms.formmodel.Field.getValue(Field.java:113) at org.apache.cocoon.forms.formmodel.Field.validate(Field.java:190) at org.apache.cocoon.forms.formmodel.WidgetList.validate(WidgetList.java:104) at org.apache.cocoon.forms.formmodel.AbstractContainerWidget.validate(AbstractC ontainerWidget.java:93) at org.apache.cocoon.forms.formmodel.Form.doValidate(Form.java:297) at org.apache.cocoon.forms.formmodel.Form.process(Form.java:244) can't figure it out. jakob - Original Message - From: Bruno Dumon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 29, 2004 6:14 PM Subject: Re: cocoon forms - flow custom validator On Thu, 2004-04-29 at 09:52, Jakob Schwendner wrote: Hi there, I am using cocoon 2.1.5-dev (CVS 28/04/2004) to perform form handling with the Cocoon Forms framework. Everything works fine and the widgets get validated nicely, however, when I try to add custom validation to the flowscript by setting the form.validator it gets completely ignored. var form = new Form(forms/register.xml); form.validator = function(form, bizdata) { var validationError = new Packages.org.apache.cocoon.forms.validation.ValidationError(xxx); if (form.getWidget(login).getValue() == test) { form.getWidget(login).setValidationError(validationError); return false; } return true; } form.showForm( get_page_name(), bizdata ); I think the above code should be correct. I tried to do some debugging and am sure that the validator function just doesn't get called by the Forms class. When I use the JavaScript debugger I can't actually get past the loadPageAndWait(). This is because when I break at the continuation the debugger jumps to the function declaration of the last called function, does however not go into the function when I tell it to. Any ideas as to why this behaviour occurs? Does it work different then before? Note that the custom validator only gets called after the normal validation ended successfully (thus also all required fields must be completed) Since you're using latest CVS anyway, I'd suggest not to use that validator function but make use of the possiblity to add WidgetValidators to widgets. If you add such a WidgetValidator to the form itself, then this would be very similar to the form.validator function (except that it becomes part of the normal validation cycle, not something that is done afterwards). To do this from within flowscript: form.getWidget().addValidator(newValidator(function(widget) { (see javadoc of class WidgetValidator for more info on the behaviour of the code herin, basically if there's an error return false + set a validation error on some widget) }); with newValidator being an utility function to implement a java interface from within flowscript: function newValidator(validatorFunction) { var validator = {validate: validatorFunction }; var adapter = new JavaAdapter(Packages.org.apache.cocoon.forms.validation.WidgetValidator, validator); return adapter; } There might be some typos in all of the above. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
Re: sitemap-v06.rng
Martin Holz wrote: I use sitemap-v06.rng for editing the sitemap with oxygen and I like it to be very restrictive. So I do not always have to look into the docu to see how a configuration looks exactly. I do change the sitemap quite often but do not write new components very often, especially compontents which need additional configuration elements. Adapting sitemap-v06.rng once in a while is a low price for good sitemap editing support. Perhaps we could have two schema: sitemap-strict.rng sitemap-lax.rng With the lax one, we could implement David's idea to be not so strict. With the strict one we could keep adding to it so that it defines everything that is allowable. This helps with automated editor prompts and so is a type of sitemap documentation. I recently re-added the build target validate-sitemaps. Running it against today's CVS still shows many things missing (you may need to edit tools/targets/validate-build.xml to include more sitemaps). The trouble with the strict one is the maintenance. We don't see many people helping out with improving it and keeping it up-to-date. It would be an excellent resource if we did. It is great to hear that the various xml editors are providing support for RELAX NG. --David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon 2.1.5 And Hibernate : startup issues
Hi, I was successful in using Hibernate 2.1 under Cocoon 2.1.3. But when I try to start Hibernate 2.1 under Cocoon 2.1.5 . Hibernate fails when it tries to set up cache. I think that it is an issue with either commons-*.jar or x*.jar files. If any one knows how to solve this problem, please help. Thanks in advance. iyyappan
Silly Questions NO1: what does woodybinding do?
I read the documentation of woody forms and now I am reading the inbuilt sample: woody form GUI, I am confused. this sample seems to be quite different from those in the documentation. I have some silly questions. what does woodybinding do? in the documentation, it is saidbinding is for loading and saving data from and to files or beans. in the sample, first form is created by a definition file, then it is binding by a bindingfile. there is no data file appointment till now, what does the binding do then? //inbuilt sample: woodyform http://localhost/samples/woody/form_model_gui.flow
Silly Question NO2: difference between row-path and row-path-insert
following is extracted from an inbuilt sample from cocoon's woody form. I don't quite understand what is the story. it seems: 1.wb:context matches with the root element "/wd:form"ofa woody form definition file. Is this right? 2. a class "widgets-class" is defined in "/wd:form/wd:widgets". what does row-path="*" mean? what is its different with "row-path-insert"? wb:context xmlns:wb="http://apache.org/cocoon/woody/binding/1.0" xmlns:wd="http://apache.org/cocoon/woody/definition/1.0" path="/wd:form" lenient="true" wb:new id="widgets-class"/ wb:class id="widgets-class" wb:temp-repeater id="widgets" parent-path="wd:widgets" row-path="*" row-path-insert="." virtual-rows="true" wb:on-bind wb:new id="widget-row-class"/ /wb:on-bind /wb:temp-repeater /wb:class wb:class id="widget-row-class" wb:_javascript_ id="type" path="." wb:load-form var node = jxpathPointer.getNode().getFirstChild(); widget.setValue(node.getLocalName()); /wb:load-form wb:save-form /wb:save-form /wb:_javascript_ wb:union id="union" path="." wb:new id="action-class"/ wb:new id="aggregatefield-class"/ wb:new id="booleanfield-class"/ wb:new id="class-class"/ wb:new id="field-class"/ wb:new id="new-class"/ wb:new id="output-class"/ wb:new id="repeater-class"/ wb:new id="row-action-class"/ wb:new id="struct-class"/ wb:new id="submit-class"/ wb:new id="union-class"/ /wb:union /wb:class wb:class id="action-class" wb:case id="action" path="." wb:insert-node wd:action/ /wb:insert-node wb:struct id="action" path="wd:action" wb:value id="label" path="wd:label"/ wb:value id="id" path="@id"/ /wb:struct /wb:case /wb:class
Silly Question NO3: wb:on-bind
I searched in google, it seems wb:on-bind is executed when an existing repeater row is updated or after inserting a new row, is it right? if it is,let'ssayit is invoked by updating an existing row, does this mean an new rowobject is created and the old one is discarded? wb:class id="widgets-class" wb:temp-repeater id="widgets" parent-path="wd:widgets" row-path="*" row-path-insert="." virtual-rows="true" wb:on-bind wb:new id="widget-row-class"/ /wb:on-bind /wb:temp-repeater /wb:class
Silly Question NO4: jxpathPointer.getNode().getFirstChild()
4. in the "widget-row-class" definition, it seems that the path is still "/wd:form/wd:widgets". There are many nodes under this context, what does the following two line do? Why only the first Child? what is its localname? var node = jxpathPointer.getNode().getFirstChild(); widget.setValue(node.getLocalName()); wb:context xmlns:wb="http://apache.org/cocoon/woody/binding/1.0" xmlns:wd="http://apache.org/cocoon/woody/definition/1.0" path="/wd:form" lenient="true" wb:new id="widgets-class"/ wb:class id="widgets-class" wb:temp-repeater id="widgets" parent-path="wd:widgets" row-path="*" row-path-insert="." virtual-rows="true" wb:on-bind wb:new id="widget-row-class"/ /wb:on-bind /wb:temp-repeater /wb:class wb:class id="widget-row-class" wb:_javascript_ id="type" path="." wb:load-form var node = jxpathPointer.getNode().getFirstChild(); widget.setValue(node.getLocalName()); /wb:load-form wb:save-form /wb:save-form /wb:_javascript_ wb:union id="union" path="." wb:new id="action-class"/ wb:new id="aggregatefield-class"/ wb:new id="booleanfield-class"/ wb:new id="class-class"/ wb:new id="field-class"/ wb:new id="new-class"/ wb:new id="output-class"/ wb:new id="repeater-class"/ wb:new id="row-action-class"/ wb:new id="struct-class"/ wb:new id="submit-class"/ wb:new id="union-class"/ /wb:union /wb:class wb:class id="action-class" wb:case id="action" path="." wb:insert-node wd:action/ /wb:insert-node wb:struct id="action" path="wd:action" wb:value id="label" path="wd:label"/ wb:value id="id" path="@id"/ /wb:struct /wb:case /wb:class
Silly Question NO5: wb:case
There is a wb:case in "action-class", whatare the two values it compareswith? here, it inserts a node: wd:action/, which has a namespace of "wd" where is this node inserted, what does the following wb:struct do? wb:class id="action-class" wb:case id="action" path="." wb:insert-node wd:action/ /wb:insert-node wb:struct id="action" path="wd:action" wb:value id="label" path="wd:label"/ wb:value id="id" path="@id"/ /wb:struct /wb:case /wb:class
Silly Question NO5: wb:case
There is a wb:case in "action-class", whatare the two values it compareswith? here, it inserts a node: wd:action/, which has a namespace of "wd", thenwhere is this node inserted? to the form definition file? what does the following wb:struct do with this node? wb:class id="action-class" wb:case id="action" path="." wb:insert-node wd:action/ /wb:insert-node wb:struct id="action" path="wd:action" wb:value id="label" path="wd:label"/ wb:value id="id" path="@id"/ /wb:struct /wb:case /wb:class
Silly Question NO6: widget definition:
following is extracted from a form defnition file: 1.why should each itembe wrapped by wd:label in " wd:item value="action"wd:labelAction/wd:label/wd:item "? 2. does"" in'value=""'refer to"@id" inwd:struct? 3. what does 'case="type" ' mean? wd:class id="widget-row-class" wd:widgets wd:booleanfield id="select"wd:labelSelect/wd:label/wd:booleanfield wd:field id="type" wd:labelWidget Type/wd:label wd:datatype base="string"/ wd:selection-list wd:item value=""wd:labelNothing/wd:label/wd:item wd:item value="action"wd:labelAction/wd:label/wd:item wd:item value="aggregatefield"wd:labelAggregateField/wd:label/wd:item wd:item value="booleanfield"wd:labelBooleanField/wd:label/wd:item wd:item value="class"wd:labelClass/wd:label/wd:item wd:item value="field"wd:labelField/wd:label/wd:item wd:item value="new"wd:labelNew/wd:label/wd:item wd:item value="output"wd:labelOutput/wd:label/wd:item wd:item value="repeater"wd:labelRepeater/wd:label/wd:item wd:item value="row-action"wd:labelRowAction/wd:label/wd:item wd:item value="struct"wd:labelStruct/wd:label/wd:item wd:item value="submit"wd:labelSubmit/wd:label/wd:item wd:item value="union"wd:labelUnion/wd:label/wd:item /wd:selection-list /wd:field wd:union id="union" default="" case="type" wd:datatype base="string"/ wd:labelType/wd:label wd:widgets wd:struct id="action" wd:labelAction/wd:label wd:widgets wd:new id="id-class"/ wd:new id="label-class"/ /wd:widgets /wd:struct