hi philipp,
var mail = ""; //here is the boolean field mail!!!!
"mail" is a booleanfield, so you have to set either
var mail = true;
or
var mail = false;
as you can see from the error message:
java.lang.RuntimeException: Cannot set value of boolean field "test" to a non-Boolean value.
"" is not a boolean value, hence the error message.
hth, johannes
Philipp Rech wrote:
okay my from definition and template look almost like this
http://cocoon.apache.org/2.1/userdocs/forms/sample.html
the only thing different is that they are split up in two
pages thus two from definitions and templates.
the reason for all that is to be able to go back to the first page change something and will u click on submit the second page appears with the
values u enteres before... wizard like. mybe there is even a better
soloution for this... *wonders*...
here is my flowscript. it works as i want with the input fields but not with
the boolean (checkbox!) fields called "mail". see: //(DOENST WORK) wmail = form_2.lookupWidget("mail");
//(DOSENT WORK) wmail.setValue(mail);
---------- the flowscript: -------------------
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
function registration (){
var username = ""; var email = ""; var password = ""; var sex = ""; var color = ""; var mail = ""; //here is the boolean field mail!!!! var age = "";
var form_1 = new Form("form-1.xml");
form_1.showForm("registration-display-pipeline");
var username = cocoon.request.name;
var email = cocoon.request.email;
var age = cocoon.request.age;
var sex = cocoon.request.sex;
var form_2 = new Form("form-2.xml");
//here check is the value hase been chenged from "" to something // and if yes redisplay the old value!!!
wfarbe = form_2.lookupWidget("farbe"); wfarbe.setValue(farbe); wpassword = form_2.lookupWidget("password"); wpassword.setValue(password); //(DOENST WORK) wmail = form_2.lookupWidget("mail"); //(DOSENT WORK) wmail.setValue(mail);
form_2.showForm("registration-display-pipeline-2");
var password = cocoon.request.password; var farbe = cocoon.request.farbe; var mail = cocoon.request.mail;
var model_1 = form_1.getModel();
var model_2 = form_2.getModel();
var bizdata = { "username" : model_1.name, "email" : model_1.email, "age" : model_1.age,
"sex" : model_1.sex,
"pw" : model_2.password,
"mail" : model_2.mail,
"farbe" : model_2.farbe
};
cocoon.sendPage("registration-success-pipeline", bizdata);
}
-----------------------------------------------------------
thank you! philipp
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
