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.

http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/Form.js?rev=54109&view=markup

Thanks for pointing that out.

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

--------------
var bizData = new Object();
bizData[Packages.o.a.c.f.transformation.FormsPipelineConfig.CFORMSKEY] =form2.form;
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": form2.form});
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.ContextHelper.getObjectModel(form2.form.avalonContext);
// 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");
    break;
 }
 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 ?

regards
Jorg


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



Reply via email to