Example usage for org.apache.commons.beanutils BeanUtilsBean BeanUtilsBean

List of usage examples for org.apache.commons.beanutils BeanUtilsBean BeanUtilsBean

Introduction

In this page you can find the example usage for org.apache.commons.beanutils BeanUtilsBean BeanUtilsBean.

Prototype

BeanUtilsBean

Source Link

Usage

From source file:org.seasar.struts.bean.SuppressPropertyUtilsBeanTest.java

public void testBeanUtilsBean_default_populate() throws Exception {
    BeanUtilsBean beanUtils = new BeanUtilsBean();
    Person person = new Person();
    Map properties = new HashMap();
    properties.put("fullName.firstName", "aaa");
    properties.put("fullName.lastName", "bbb");
    properties.put("address.street", "ccc");
    properties.put("age", "20");
    beanUtils.populate(person, properties);
    assertEquals("aaa", person.getFullName().getFirstName());
    assertEquals("bbb", person.getFullName().getLastName());
    assertEquals("ccc", person.getAddress().getStreet());
    assertEquals("20", person.getAge());
}

From source file:org.seasar.struts.config.S2ModuleConfig.java

public void dispose() {
    actionConfigs.clear();
    actionConfigList.clear();
    formBeans.clear();
    BeanUtilsBean.setInstance(new BeanUtilsBean());
    initialized = false;
}