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("[EMAIL PROTECTED]");
    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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to