public class SimpleBindingProcessorAdapterGenerator
extends com.google.gwt.core.ext.Generator
SimpleBindingProcessorAdapters
.
SimpleBindingProcessor
requires clients to supply an explicit
SimpleBindingProcessorAdapter
interface through which to execute binding calls. In
most cases, clients can use SimpleBindingProcessorAdapterGenerator
to automatically
generate this as a secondary class. First, they modify their .gwt.xml
file to
include...
<generate-with class="org.metawidget.gwt.generator.widgetprocessor.binding.simple.SimpleBindingProcessorAdapterGenerator">
<when-type-assignable class="com.foo.BusinessClass"/>
</generate-with>
...then they call...
SimpleBindingProcessorConfig config = SimpleBindingProcessorConfig();
config.setAdapter(BusinessClass.class, (SimpleBindingProcessorAdapter<BusinessClass>) GWT.create( BusinessClass.class ));
metawidget.addWidgetProcessor(new SimpleBindingProcessor(config));
This generator statically generates code for all levels of all possible properties (eg.
contact.address.street
), including subtypes of properties. Because this could
quickly become very large, we impose the following restriction:
SimpleBindingProcessorAdapter
or, more drastically, their own binding implementation
that implements PropertyBinding
.Constructor and Description |
---|
SimpleBindingProcessorAdapterGenerator() |
Copyright © 2015. All Rights Reserved.