Well,

this seems like one _positive_ effect of me lining up the 'lenient' stuff :-)

the catch-all stratetgy over at ValueJXPathBinding has been hiding that this wasn't working from the start!

I just changed the form2-model.xml to be declaring number as of type 'integer' to match the bean, which fixes the sample. (I could of have changed the type over in the bean as well of course)

regards,
-marc=
(for those wondering: during binding back the setValue() of type long on a bean-property of type int is (leniently) handled by jxpath, the other way around woody requires a full match though)


Antonio Gallardo wrote:

Hi:

This sample:
http://localhost:8080/cocoon/samples/woody/form2bean.flow

currently is not working, throw an error page.

Best Regards,

Antonio Gallardo

Original Exception: java.lang.RuntimeException: Incorrect value type for
"number" (expected class java.lang.Long, got class java.lang.Integer.
        at org.apache.cocoon.woody.formmodel.Field.setValue(Field.java:171)
        at
org.apache.cocoon.woody.binding.ValueJXPathBinding.doLoad(ValueJXPathBinding.java:127)
        at
org.apache.cocoon.woody.binding.JXPathBindingBase.loadFormFromModel(JXPathBindingBase.java:159)
        at
org.apache.cocoon.woody.binding.ComposedJXPathBindingBase.doLoad(ComposedJXPathBindingBase.java:129)
        at
org.apache.cocoon.woody.binding.ContextJXPathBinding.doLoad(ContextJXPathBinding.java:85)
        at
org.apache.cocoon.woody.binding.JXPathBindingBase.loadFormFromModel(JXPathBindingBase.java:159)
        at
org.apache.cocoon.woody.binding.JXPathBindingBase.loadFormFromModel(JXPathBindingBase.java:175)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)


-- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED]



Reply via email to