You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alessandro Vincelli <a....@w4b.it> on 2006/03/03 10:51:29 UTC
CFORM: on-delete-row
I have this error on save a form with repeater
Internal Server Error
Message: Cannot set property /rows[1]/@row-state, path does not match a
changeable location
Description: org.apache.cocoon.ProcessingException: Error calling
continuation at
resource://org/apache/cocoon/forms/flow/javascript/Form.js:228:-1 at
file:/var/webapps/certnet/cforms/cforms/flow/cattura.js:184:-1 at
<map:call> - file:/var/webapps/certnet/cforms/sitemap.xmap:368:83 at
<map:mount> - file:/var/webapps/certnet/sitemap.xmap:727:83
Sender: org.apache.cocoon.servlet.CocoonServlet
Source: Cocoon Servlet
The problem is on the delete row!
<fb:on-delete-row>
<fb:set-attribute name="row-state" value="deleted"/>
</fb:on-delete-row>
Any ideas?
thanks in advance
Alessandro
Complete binding
<?xml version="1.0" encoding="ISO-8859-1"?>
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:xsp="http://apache.org/xsp"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" path="/">
<fb:repeater id="AnagrafeOperaiTemp" parent-path="." row-path="rows">
<fb:identity>
<fb:value id="opcodced" path="@opcodced"/>
</fb:identity>
<fb:on-bind>
<fb:value id="opcodimp" path="opcodimp"/>
<fb:value id="opcognom" path="opcognom"/>
<fb:value id="opnomeop" path="opnomeop"/>
<fb:value id="opdtnasc" path="opdtnasc"/>
<fb:value id="opcodfis" path="opcodfis"/>
</fb:on-bind>
<fb:on-insert-row>
<fb:insert-bean addmethod="addRow"
classname="w4b.com.cassagest.db.AnagrafeOperaitemp"/>
</fb:on-insert-row>
<fb:on-delete-row>
<fb:set-attribute name="row-state" value="deleted"/>
</fb:on-delete-row>
</fb:repeater>
</fb:context>
--
-------------------------------
Alessandro Vincelli
W4B - web for business s.r.l.
Via Volturno, 10/12
Sesto Fiorentino (FI)
Tel. 0571 998771
Fax. 055 340576
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: CFORM: on-delete-row
Posted by Simone Gianni <s....@thebug.it>.
Ciao Alessandro,
althought fb:set-attribute is desgined to work with XML binding, i think
you can use it also on beans, since JXPath should operate correctly
making the difference transparent to the user. Anyway, in this case, it
is searching for a setRow-state or for a public row-state variable. I'm
not sure if JXPath will translate this to a java valid name, because
setRow-state is surely not a valid one.
So you should try the following :
- Make sure the bean you are using (AnagrafeOperaitemp) has a
setRowstate/getRowstate or a public rowstate field.
- Then try to use rowstate instead of row-state to see if JXPath calls
the setter.
Hope this helps,
Simone
Alessandro Vincelli wrote:
>
>
> I have this error on save a form with repeater
>
> Internal Server Error
> Message: Cannot set property /rows[1]/@row-state, path does not match
> a changeable location
>
> Description: org.apache.cocoon.ProcessingException: Error calling
> continuation at
> resource://org/apache/cocoon/forms/flow/javascript/Form.js:228:-1 at
> file:/var/webapps/certnet/cforms/cforms/flow/cattura.js:184:-1 at
> <map:call> - file:/var/webapps/certnet/cforms/sitemap.xmap:368:83 at
> <map:mount> - file:/var/webapps/certnet/sitemap.xmap:727:83
>
> Sender: org.apache.cocoon.servlet.CocoonServlet
>
> Source: Cocoon Servlet
>
>
>
> The problem is on the delete row!
>
> <fb:on-delete-row>
> <fb:set-attribute name="row-state" value="deleted"/>
> </fb:on-delete-row>
>
>
> Any ideas?
>
> thanks in advance
> Alessandro
>
>
>
>
>
> Complete binding
>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" path="/">
>
> <fb:repeater id="AnagrafeOperaiTemp" parent-path="." row-path="rows">
> <fb:identity>
> <fb:value id="opcodced" path="@opcodced"/>
> </fb:identity>
>
> <fb:on-bind>
> <fb:value id="opcodimp" path="opcodimp"/>
> <fb:value id="opcognom" path="opcognom"/>
> <fb:value id="opnomeop" path="opnomeop"/>
> <fb:value id="opdtnasc" path="opdtnasc"/>
> <fb:value id="opcodfis" path="opcodfis"/>
> </fb:on-bind>
>
> <fb:on-insert-row>
> <fb:insert-bean addmethod="addRow"
> classname="w4b.com.cassagest.db.AnagrafeOperaitemp"/>
> </fb:on-insert-row>
>
> <fb:on-delete-row>
> <fb:set-attribute name="row-state" value="deleted"/>
> </fb:on-delete-row>
>
> </fb:repeater>
> </fb:context>
>
>
>
--
Simone Gianni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org