The next release of Metawidget (v1.15) will include a small enhancement to the metawidget.xml syntax used by ConfigReader. ConfigReader has always been designed to automatically recognise and reuse immutable instances. This works both when configuring multiple Metawidgets, and configuring multiple settings for a single Metawidget. So if you did...
...ConfigReader would be smart enough to reuse the same javaBeanPropertyStyle instance. But you still had to specify all javaBeanPropertyStyle's configuration options twice. In v1.15 you can instead use id and refId to refer from one setting to another:
Type the following commands and press ENTER after each one. Accept any defaults you are prompted for, and remember to use TAB and UP ARROW autocomplete:
new-project --named MyApp --topLevelPackage com.myapp persistence setup --provider HIBERNATE --container JBOSS_AS6 new-entity --named Person new-field string --named firstname new-field string --named surname new-field int --named age new-field string --named notes new-field custom --named homeAddress [type=The qualified Class to be used as this field's type (of type java.lang.String)]: com.myapp.Address new-field custom --named workAddress [type=The qualified Class to be used as this field's type (of type java.lang.String)]: com.myapp.Address new-entity --named Address new-field string --named street new-field string --named suburb new-field string --named state new-field string --named postcode scaffold from-entity com.myapp.domain.Person.java exit