cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans>
Subject Re: unrolling the form loop (was Re: Repeater insert-node does not bind??)
Date Thu, 11 Nov 2004 12:45:30 GMT

Joerg Heinicke wrote:
> The function showForm() is a bit more complex. You need at least the 
> this.form.process(formContext) stuff which also returns the value 
> finished for the while loop.

Thanks for pointing that out.

The unrolled loop now looks like (form2 is my formobject)

var bizData = new Object();
if (form2.form.locale == null){
     form2.form.locale = java.util.Locale.getDefault();
bizData["locale"] = form2.form.locale;

while (true){
  var result = cocoon.sendPageAndWait("uri",{"CocoonFormsInstance": 
  var formContext = new Packages.o.a.c.forms.FormContext(
cocoon.request, form2.form.locale);

//could not access form2.form.avalonContext for some reason
//var objectModel = 
//   org.apache.cocoon.components.flow.flowHelper.setContextObject(
//objectModel, bizData);

  var finished = form2.form.process(formContext);
  //this causes an exception
  form2.binding.saveFormToModel(form2.form, campaignFormBean);
  if (finished){
     print("finished form");
  print("redisplaying form");

But i'm getting Exception trying to remove xpath .; Cannot modify 
property: mybean.participants; java.lang.reflect.InvocationTargetException

This happens when nodes are removed from the repeater.

I have public get and set methods for the ArrayList "participants" in 
mybean with a binding that used to work before
<fb:repeater id="participants" parent-path="." row-path="participants">

Did i step on something i shouldn't ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message