[jira] Commented: (COCOON-1863) Save form model with empty fields: Binding model to document fails
[ http://issues.apache.org/jira/browse/COCOON-1863?page=comments#action_12428376 ] Feliciano Borrego commented on COCOON-1863: --- Is the same Issue 1687 reopen by Marc Portier: http://issues.apache.org/jira/browse/COCOON-1687 > Save form model with empty fields: Binding model to document fails > -- > > Key: COCOON-1863 > URL: http://issues.apache.org/jira/browse/COCOON-1863 > Project: Cocoon > Issue Type: Bug > Components: Blocks: Forms >Affects Versions: 2.1.9 >Reporter: Feliciano Borrego > > In the Cocoon example "samples/blocks/forms/form2xml.flow", > when submit the form with the fields "IP adress", "phone number" and all > "contacts" fields empty, > in Cocoon 2.1.8 the XML is: > > > > > [EMAIL PROTECTED] > > > > > > > > > 1960-04-10 > > JupilerHoegaarden > > > > > > > > > > > > > > > > > > Therefore in Cocoon 2.1.9 the XML result is: > > > > > [EMAIL PROTECTED] > > > > > > 1960-04-10 > > JupilerLeffe > > > > > > > > > > > > The "Simple XML Binding " and "Bean Binding" examples works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1863) Save form model with empty fields: Binding model to document fails
[ http://issues.apache.org/jira/browse/COCOON-1863?page=comments#action_12416476 ] Feliciano Borrego commented on COCOON-1863: --- The XML of is: * Cocoon 2.1.8 : * Cocoon 2.1.9+ : > Save form model with empty fields: Binding model to document fails > -- > > Key: COCOON-1863 > URL: http://issues.apache.org/jira/browse/COCOON-1863 > Project: Cocoon > Type: Bug > Components: Blocks: Forms > Versions: 2.1.9 > Reporter: Feliciano Borrego > > In the Cocoon example "samples/blocks/forms/form2xml.flow", > when submit the form with the fields "IP adress", "phone number" and all > "contacts" fields empty, > in Cocoon 2.1.8 the XML is: > > > > > [EMAIL PROTECTED] > > > > > > > > > 1960-04-10 > > JupilerHoegaarden > > > > > > > > > > > > > > > > > > Therefore in Cocoon 2.1.9 the XML result is: > > > > > [EMAIL PROTECTED] > > > > > > 1960-04-10 > > JupilerLeffe > > > > > > > > > > > > The "Simple XML Binding " and "Bean Binding" examples works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1863) Save form model with empty fields: Binding model to document fails
[ http://issues.apache.org/jira/browse/COCOON-1863?page=comments#action_12416469 ] Feliciano Borrego commented on COCOON-1863: --- In the Cocoon example "form2xml.flow", submiting the form with the field "Please enter your IP address" empty, the form.save() function: function form2xml(form) { [...] // bind the form's data back to the document form.save(document); saveDocument(document, makeTargetURI(documentURI)); cocoon.sendPage("form2-success-pipeline"); } in Cocoon 2.1.9/2.1.10-dev makes a "document" that does not contain the node corresponding to this form field. However in Cocoon 2.1.8, the Xml contains the empty node In my application: = * Flow.js -- function form2xml(form) { [...] // bind the form's data back to the document form.save(document); cocoon.sendPage( "frm-success-pipeline", { "htmldata" : document } ); } * sitemap.xmap *formModel2xml.jx http://apache.org/cocoon/templates/jx/1.0";> #{htmldata} In Cocoon 2.1.8, the XML contains ALL nodes of the form model. In a XSP, the jpath expression return an empty string, not a null (or exception with set-lenient lenient="false"). The Xml tree created by Cocoon 2.1.9+ not contains any empty node, the empty nodes corresponding to empty form fields are eliminated. > Save form model with empty fields: Binding model to document fails > -- > > Key: COCOON-1863 > URL: http://issues.apache.org/jira/browse/COCOON-1863 > Project: Cocoon > Type: Bug > Components: Blocks: Forms > Versions: 2.1.9 > Reporter: Feliciano Borrego > > In the Cocoon example "samples/blocks/forms/form2xml.flow", > when submit the form with the fields "IP adress", "phone number" and all > "contacts" fields empty, > in Cocoon 2.1.8 the XML is: > > > > > [EMAIL PROTECTED] > > > > > > > > > 1960-04-10 > > JupilerHoegaarden > > > > > > > > > > > > > > > > > > Therefore in Cocoon 2.1.9 the XML result is: > > > > > [EMAIL PROTECTED] > > > > > > 1960-04-10 > > JupilerLeffe > > > > > > > > > > > > The "Simple XML Binding " and "Bean Binding" examples works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COCOON-1863) Save form model with empty fields: Binding model to document fails
[ http://issues.apache.org/jira/browse/COCOON-1863?page=comments#action_12416222 ] Feliciano Borrego commented on COCOON-1863: --- In my form, if string field "mail_pers" is empty, the jpath expression thows the error: --- org.apache.commons.jxpath.JXPathException: No value for xpath: mail_pers at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:344) at org.apache.commons.jxpath.ri.JXPathCompiledExpression.getValue(JXPathCompiledExpression.java:57) at org.apache.cocoon.www.file_.D_.Des.Proy.SigPortal.web.portal.xsp.PersonalPerfil_bind_xsp.generate(org.apache.cocoon.www.file_.D_.Des.Proy.SigPortal.web.portal.xsp.PersonalPerfil_bind_xsp:567) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:228) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:578) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:281) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:779) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:412) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:100) at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:320) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:124) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:578) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:281) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:480) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:298) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.access$000(ConcreteTreeProcessor.java:47) at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:339) at org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:59) at org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:209) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:905) at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:698) at org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:269) at inv9.invoke() > Save form model with empty fields: Binding model to document fails > -- > > Key: COCOON-1863 > URL: http://issues.apache.org/jira/browse/COCOON-1863 > Project: Cocoon > Type: Bug > Components: Blocks: Forms > Versions: 2.1.9 > Reporter: Feliciano Borrego > > In the Cocoon example "samples/blocks/forms/form2xml.flow", > when submit the form with the fields "IP adress", "phone number" and all > "contacts" fields empty, > in Cocoon 2.1.8 the XML is: > > > > > [EMAIL PROTECTED] > > > > > > > > > 1960-04-10 > > JupilerHoegaarden > > > > > > > > > > > > > > > > > > Therefore in Cocoon 2.1.9