Package org.apache.cocoon.forms.samples

Examples of org.apache.cocoon.forms.samples.Form2Bean


                                                  .add("somebool", ((BooleanField)form.getChild("somebool")).getValue())
                                                  .add("firstname", ((Field)((Repeater)form.getChild("contacts")).getWidget(1, "firstname")).getValue()));
    }

    public void doEditForm2() throws BindingException {
        Form2Bean bean = new 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(Sex.FEMALE);
        Contact contact = new Contact();
        contact.setId(1);
        contact.setFirstName("Hermann");
        bean.addContact(contact);

        FormInstance form = new FormInstance("forms/form2.xml", "forms/form2-binding.xml");
        form.load(bean);
        form.show("form/form2");
        form.save(bean);
View Full Code Here


                                                  .add("somebool", ((BooleanField)form.getChild("somebool")).getValue())
                                                  .add("firstname", ((Field)((Repeater)form.getChild("contacts")).getWidget(1, "firstname")).getValue()));
    }

    public void doEditForm2() throws BindingException {
        Form2Bean bean = new 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(Sex.FEMALE);
        Contact contact = new Contact();
        contact.setId(1);
        contact.setFirstName("Hermann");
        bean.addContact(contact);

        FormInstance form = new FormInstance("forms/form2.xml", "forms/form2-binding.xml");
        form.load(bean);
        form.show("form/form2");
        form.save(bean);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.forms.samples.Form2Bean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.