You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorge Davila <is...@nicaraguarealestate.com> on 2005/03/28 20:55:58 UTC

Re: [Cforms-binding] Setting a constant value to a field using

Hello Antonio:

In my understanding of the process ... you "must" have a method,
constant or field in your java class that return the value that you
want.

"Factory is not set ..." is obtained because there is no field, constant
or method defined in your java class doing reference to the "desired
value".

Jorge Dávila.

P.D.: Te agradezco que me hayás puesto en contacto con este marco de
trabajo para desarrollo web y te pido disculpas (públicas) por no
haberme permitido la posibilidad de desarrollarme dentro de tu equipo de
trabajo.

El lun, 28-03-2005 a las 09:21 -0600, Antonio Gallardo escribió:
> Hi:
> 
> Playing with the binding framework, I tried to set a constant value for a
> field:
> 
> The field definition is:
> 
> <fd:field  id="cli_test">
>   <fd:datatype base="boolean"/>
> </fd:field>
> 
> The binding is:
> 
> <fb:value id="cli_test" path="cli_test" direction="load"/>
> <fb:javascript id="cli_test" path="cli_test" direction="save">
>   <fb:save-form>
>     //var formValue = widget.getValue();
>     var appValue = doSaveConversion("false");
>     jxpathPointer.setValue(appValue);
>   </fb:save-form>
> </fb:javascript>
> 
> The load direction works well, the problem is while saving back. I always
> throw:
> 
> Factory is not set on the JXPathContext - cannot create path: /cli_test
> 
> Descripción : org.apache.avalon.framework.CascadingRuntimeException:
> "resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 190:
> uncaught JavaScript exception:
> at auth_success
> (file:/home/desarrollo/tomcat/webapps/sga/resources/flow/auth.js, Line
> 42):
> org.apache.avalon.framework.CascadingRuntimeException:
> "resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 190:
> uncaught JavaScript exception:
> at createform
> (file:/home/desarrollo/tomcat/webapps/sga/docs/cliente/forms/create/flow.js,
> Line 8)
> at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 190):
> org.apache.commons.jxpath.JXPathException: Exception trying to create
> xpath cli_impuestosprecios; Factory is not set on the JXPathContext -
> cannot create path: /cli_impuestosprecios
> 
> What I can do? Please help.
> 
> Best Regards,
> 
> Antonio Gallardo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Cforms-binding] Setting a constant value to a field using

Posted by Antonio Gallardo <ag...@agssa.net>.
On Lun, 28 de Marzo de 2005, 12:55, Jorge Davila dijo:
> Hello Antonio:
>
> In my understanding of the process ... you "must" have a method,
> constant or field in your java class that return the value that you
> want.
>
> "Factory is not set ..." is obtained because there is no field, constant
> or method defined in your java class doing reference to the "desired
> value".

There is the java attribute. In fact, I just get a working code to play
with this. And just tried to set a constant value. Not too much changes
after all. :-)

Please see my reply to Leszek in this thread to see how and why this failed.

Best Regards,

Antonio Gallardo

> Jorge Dávila.
>
> P.D.: Te agradezco que me hayás puesto en contacto con este marco de
> trabajo para desarrollo web y te pido disculpas (públicas) por no
> haberme permitido la posibilidad de desarrollarme dentro de tu equipo de
> trabajo.

No te preocupés por eso. ;-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org