Hi,

I have a problem with a very simple repeater in cocoon-2.1.9/tomcat-5.5.16/java-1.6.

This is the binding that I use:

<fb:repeater id="keywords" parent-path="." row-path="keywords">
  <fb:on-bind>
    <fb:value id="keyword" path="keyword" />
  </fb:on-bind>
  <fb:on-delete-row>
    <fb:delete-node />
  </fb:on-delete-row>
  <fb:on-insert-row>
    <fb:insert-bean classname="java.lang.String"
                    addmethod="addKeyword" />
  </fb:on-insert-row>
</fb:repeater>

The class for which the binding is, contains, among other,

public class Specification {
...
  public void addCategory(String category)
  {
    this.categories.add(category);
  }
}

There is no setCategory(String category) method.

Below is the relevant portion of the definition:

<fd:repeater id="keywords" initial-size = "1">
  <fd:widgets>
    <fd:field id="keyword" required="true">
     <fd:label>Keyword</fd:label>
     <fd:datatype base="string" />
   </fd:field>
   ...
 </fd:widgets>
</fd:repeater>

The flow contains, among other,

var spec = new Specification();
...
form.save(spec);
..

The error message that I get when form.save(spec) is executed is:

org.apache.commons.jxpath.JXPathException: Cannot set property: /keywords[1]/keyword - no such property

What exactly is the meaning of the error? Should there be a setCategory() method on the Specification class? That would not make sense to me. What is missing/wrong?

Thanks,

--
Andre H. Juffer              | Email: [EMAIL PROTECTED]
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
    the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to