Keith, 

Is it possible to have conditional logic to do the marshalling of an
arraylist ?. 
For example., if the arraylist has 10 elements of Port objects , and 6 of
them have the sequence to be "i", then 
I want to have only 6 arrival tags under AllArrivals tag, as opposed to 10.

Thanks, 
Sathya

The mapping file:

<mapping>
        <class name="com.cpships.vss.schedule.Schedule">
                <map-to xml="schedule"/>
                <field name="arrivalPorts" ( Do this only if the sequence is
i )  type="com.cpships.vss.domain.Port" collection="arraylist">
                        <bind-xml name="arrival" location="AllArrivals"/>
                </field>
        </class>
        <class name="com.cpships.vss.domain.Port">
                <field name="sequence" type="java.lang.String">
                        <bind-xml name="sequence" node="attribute"/>
                </field>
                <field name="portCode" type="java.lang.String">
                        <bind-xml name="portcode" node="element"/>
                </field>
        </class>
</mapping>



Thanks, 
Sathya

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to