new-instance-script handler
It is responsible for instantiating new objectswithin a finder on user request .
Attribute
|
Usage
|
---|---|
if |
EL expression that must be evaluated to true prior to handler action |
unless |
With the following example the model will alow to create a new city within a country:
<datanode name="country">
...
<finder name="cities" type="city" >
<collection-finder collection="${instance.cities}">
<new-instance-script>
c = new City();
c.countryAbbreviation = instance.abbreviation;
return c;
</new-instance-script>
</finder>
...
</datanode>