You should have add-method, and a function that adds to the vectory.
Cheers,
Brett
-----Original Message-----
From: David Sean Taylor [mailto:[EMAIL PROTECTED]]
Sent: Friday, 5 April 2002 2:03 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Castor XML: Set-method not called on Vectors
New to Castor mailing list, hope its appropriate to ask these kinds of
questions.
The set-method is never called for a vector node:
<mapping>
<class name="org.apache.jetspeed.om.profile.psml.PsmlPortlets">
<map-to xml="portlets"/>
...
<field name="references"
type="org.apache.jetspeed.om.profile.psml.PsmlReference"
set-method="setReferences"
collection="vector">
<bind-xml name="reference"/>
</field>
If I don't specify 'set-method', Castor calls the default get-method by
name, and then sets adds each element to the vector itself.
If I use the set-method as above, neither the set nor get is called.
The PsmlPortlets class has a method:
public void setReferences(Vector refs)
Is there anyway to get my set-method called on a vector?
Thanks,
David
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
