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:
>>
>> <wb:context path="cuentaInventario">
>>   <wb:value id="prod_id_inventario" path="prod_id"/>
>>   <wb:value id="cc_id_inventario"   path="cc_id"/>
>> </wb:context>
>>
>> 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:
>>
>> <snip>
>> org.apache.commons.jxpath.JXPathException: Exception trying to create
>> xpath cuentaInventario; Factory is not set on the JXPathContext - cannot
>> create path: /cuentaInventario
>> </snip>
>>
>> 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.
>>
> <exception snipped>
>

  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 <wb:context> 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

Reply via email to