--- Timothy Larson <[EMAIL PROTECTED]> wrote:
> Does anybody have a working sample of a simple-repeater binding?
> I am trying to adapt the binding to work with (you guessed it)
> class, new, struct, and union, but I am having trouble getting
> the simple-repeater binding working.
More information:
The regular repeater binding works for me, but the simple-repeater
throws an exception about the factory not being set on the jxpath
context.
<!-- Regular repeater binding: works -->
<wb:repeater id="contacts"
parent-path="contacts"
row-path="contact"
unique-row-id="id"
unique-path="@id">
<wb:on-bind>
<wb:value id="sample" path="name"/>
</wb:on-bind>
</wb:repeater>
<!-- Simple repeater binding: does not work -->
<wb:simple-repeater id="contacts"
parent-path="contacts"
row-path="contact">
<wb:value id="sample" path="name"/>
</wb:simple-repeater>
Exception:
cause: org.apache.commons.jxpath.JXPathException: Exception trying to create xpath
contact[1];
Factory is not set on the JXPathContext - cannot create path:
/wd:form[1]/wd:widgets[1]/contacts[1]
-----------------------------------------------
Interesting part of exception chain stacktrace:
Original Exception: org.apache.commons.jxpath.JXPathException: Exception trying to
create xpath
contact[1]; Factory is not set on the JXPathContext - cannot create path:
/wd:form[1]/wd:widgets[1]/contacts[1]
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPath(JXPathContextReferenceImpl.java:420)
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPath(JXPathContextReferenceImpl.java:397)
at
org.apache.cocoon.woody.binding.SimpleRepeaterJXPathBinding.saveFormToModel(SimpleRepeaterJXPathBinding.java:149)
at
org.apache.cocoon.woody.binding.ComposedJXPathBindingBase.saveFormToModel(ComposedJXPathBindingBase.java:108)
at
org.apache.cocoon.woody.binding.ContextJXPathBinding.saveFormToModel(ContextJXPathBinding.java:107)
at
org.apache.cocoon.woody.binding.JXPathBindingBase.saveFormToModel(JXPathBindingBase.java:119)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
-------------------------------
Interesting part of stacktrace:
Caused by: org.apache.commons.jxpath.JXPathException: Exception trying to create xpath
contact[1];
Factory is not set on the JXPathContext - cannot create path:
/wd:form[1]/wd:widgets[1]/contacts[1]
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPath(JXPathContextReferenceImpl.java:420)
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPath(JXPathContextReferenceImpl.java:397)
at
org.apache.cocoon.woody.binding.SimpleRepeaterJXPathBinding.saveFormToModel(SimpleRepeaterJXPathBinding.java:149)
at
org.apache.cocoon.woody.binding.ComposedJXPathBindingBase.saveFormToModel(ComposedJXPathBindingBase.java:108)
at
org.apache.cocoon.woody.binding.ContextJXPathBinding.saveFormToModel(ContextJXPathBinding.java:107)
at
org.apache.cocoon.woody.binding.JXPathBindingBase.saveFormToModel(JXPathBindingBase.java:119)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
------------
--Tim Larson
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/