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 <av...@alessandro.vincelli.name> on 2006/08/31 11:06:32 UTC
[CFORMS-binding] Bean java.lang.Boolean -> booleanfield not work
In cocoon CFOMRS examples
-> Binding Samples
-> "Bean Binding - A form for just editing a Java bean"
the binding of booleanfield not work?
at this line I'm setting true the bean
bean.setEnable(java.lang.Boolean.TRUE);
But in the form the checkbox is unchecked
Any Idea?
the funcion in binding_examples.js
function form2bean(form) {
var bean = new Packages.org.apache.cocoon.forms.samples.Form2Bean();
// fill bean with some data to avoid users having to type to much
bean.setEmail("yourname@yourdomain.com");
bean.setIpAddress("10.0.0.1");
bean.setPhoneCountry("32");
bean.setPhoneZone("2");
bean.setPhoneNumber("123456");
bean.setBirthday(new java.util.Date());
bean.setSex(Packages.org.apache.cocoon.forms.samples.Sex.FEMALE);
bean.setEnable(java.lang.Boolean.TRUE);
var contact = new Packages.org.apache.cocoon.forms.samples.Contact();
contact.setId("1");
contact.setFirstName("Hermann");
bean.addContact(contact);
bean.addDrink("Maes");
bean.addDrink("Leffe");
form.load(bean);
form.showForm("form2-display-pipeline");
form.save(bean);
cocoon.sendPage("form2bean-success-pipeline", { "form2bean": bean });
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org