Re: [CForms] Binding error while saving back?
Tim Larson Escribio :-) > On Sat, Jan 31, 2004 at 06:41:49PM -0600, Antonio Gallardo wrote: >> Hi again :-D >> >> In another place we have a binding problem: >> >> >> >> >> >> >> Interesting is that this binding works while load the form, but file >> while >> saving the values in the Java Bean using the binding framework. Here is >> the error: >> >> >> org.apache.commons.jxpath.JXPathException: Exception trying to create >> xpath cuentaInventario; Factory is not set on the JXPathContext - cannot >> create path: /cuentaInventario >> >> >> Why this does not work? Is this a bug? The object cuentaInventario have >> the 2 values inside, but the binding framework is not able to set them. >> > > Hi Tim, I found the error, cuentaInventario was declared of the following way: Productocuentacontable cuentaInventario ; and it had to be declared of the following way: Productocuentacontable cuentaInventario = new Productocuentacontable(); and that corrected the problem. > Probably a silly question, but does cuentaInventario have setters defined > for prod_id and cc_id? Yes, it's have. > > Also, is this snippet inside some other context, such as a > repeater, that could be where the binding code actually messes up? Well, i do not use this inside of the repeater. > > I have found using a javascript binding acts as a good substitute for > "println" statements when debugging issues like this. You could use a > javascript binding right before the context binding or before the value > bindings to print out the values of the jxpathcontext and jxpathpointer > to see of they give any clues. Thanks for the advice. > > --Tim Larson > -- Carlos Chávez
Re: [CForms] Binding error while saving back?
Hi Tim: Thanks for the tips, we found the main object was not properly constructed. It throws the exception. We happily solved the problem. :-D Best Regards, Antonio Gallardo Tim Larson dijo: > On Sat, Jan 31, 2004 at 06:41:49PM -0600, Antonio Gallardo wrote: >> Hi again :-D >> >> In another place we have a binding problem: >> >> >> >> >> >> >> Interesting is that this binding works while load the form, but file >> while >> saving the values in the Java Bean using the binding framework. Here is >> the error: >> >> >> org.apache.commons.jxpath.JXPathException: Exception trying to create >> xpath cuentaInventario; Factory is not set on the JXPathContext - cannot >> create path: /cuentaInventario >> >> >> Why this does not work? Is this a bug? The object cuentaInventario have >> the 2 values inside, but the binding framework is not able to set them. >> > > > Probably a silly question, but does cuentaInventario have setters defined > for prod_id and cc_id? > > Also, is this snippet inside some other context, such as a > repeater, that could be where the binding code actually messes up? > > I have found using a javascript binding acts as a good substitute for > "println" statements when debugging issues like this. You could use a > javascript binding right before the context binding or before the value > bindings to print out the values of the jxpathcontext and jxpathpointer > to see of they give any clues. > > --Tim Larson >
Re: [CForms] Binding error while saving back?
On Sat, Jan 31, 2004 at 06:41:49PM -0600, Antonio Gallardo wrote: > Hi again :-D > > In another place we have a binding problem: > > > > > > > Interesting is that this binding works while load the form, but file while > saving the values in the Java Bean using the binding framework. Here is > the error: > > > org.apache.commons.jxpath.JXPathException: Exception trying to create > xpath cuentaInventario; Factory is not set on the JXPathContext - cannot > create path: /cuentaInventario > > > Why this does not work? Is this a bug? The object cuentaInventario have > the 2 values inside, but the binding framework is not able to set them. > Probably a silly question, but does cuentaInventario have setters defined for prod_id and cc_id? Also, is this snippet inside some other context, such as a repeater, that could be where the binding code actually messes up? I have found using a javascript binding acts as a good substitute for "println" statements when debugging issues like this. You could use a javascript binding right before the context binding or before the value bindings to print out the values of the jxpathcontext and jxpathpointer to see of they give any clues. --Tim Larson