cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Feliciano Borrego (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1863) Save form model with empty fields: Binding model to document fails
Date Wed, 14 Jun 2006 15:52:31 GMT
    [ 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 

<jpath:value-of select="mail_pers"     />

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:
> <data>
>   <wrapper>
>     <context>
>       <info>
>         <email boolBindingWorks="false">yourname@yourdomain.com</email>
>         <number value="3"/>
>         <choose value="true"/>
>         <phone cntr="">
>           <zone/>         
>           <number/>
>         </phone>
>       </info>
>       <ipaddress changed="true"/> 
>       <birthday>1960-04-10</birthday>
>       <drinks>
>       <drink>Jupiler</drink><drink>Hoegaarden</drink></drinks>
>       <contacts>
>         <contact id="1" row-state="original">
>           <firstname/>
>           <lastname/>
>           <phone nr=""/>
>           <email/>
>         </contact>
>         <contact id="2" row-state="original">
>           <firstname/>
>           <lastname/>
>           <phone nr=""/>
>           <email/>
>         </contact>
>       </contacts>
>     </context>
>   </wrapper>
> </data>
> Therefore in Cocoon 2.1.9 the XML result is:
> <data>
>   <wrapper>
>     <context>
>       <info>
>         <email boolBindingWorks="false">yourname@yourdomain.com</email>
>         <number value="3"/>
>         <choose value="false"/>
>         <phone>
>         </phone>
>       </info>
>       <birthday>1960-04-10</birthday>
>       <drinks>
>       <drink>Jupiler</drink><drink>Leffe</drink></drinks>
>       <contacts>
>         <contact id="1" row-state="original">
>           <phone/>
>         </contact>
>         <contact id="2" row-state="original">
>           <phone/>
>         </contact>
>       </contacts>
>     </context>
>   </wrapper>
> </data>
> 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


Mime
View raw message