Package com.googlecode.wicketwebbeans.examples.customfields

Source Code of com.googlecode.wicketwebbeans.examples.customfields.CustomFieldPage

package com.googlecode.wicketwebbeans.examples.customfields;


import org.apache.wicket.markup.html.WebPage;

import com.googlecode.wicketwebbeans.containers.BeanForm;
import com.googlecode.wicketwebbeans.model.BeanMetaData;
import com.googlecode.wicketwebbeans.model.ComponentRegistry;

public class CustomFieldPage extends WebPage
{
    private static final long serialVersionUID = 1092855853289323120L;

    public CustomFieldPage()
    {
        Address bean = new Address();
       
        // Register the ModelField for the Country class.
        ComponentRegistry registry = new ComponentRegistry();
        registry.register(Country.class, CountryField.class);
       
        BeanMetaData meta = new BeanMetaData(bean.getClass(), null, this, registry, false);
        add( new BeanForm("beanForm", bean, meta) );
    }
}
TOP

Related Classes of com.googlecode.wicketwebbeans.examples.customfields.CustomFieldPage

TOP
Copyright © 2018 www.massapi.com. 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.