Hi,

yes this handler does the work. Now, I would prefer to have a new
method that searches in the attributes of the instance and then
in the coplet data - this would provide compatibility.

Carsten 

> -----Original Message-----
> From: Ralph Goers [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 26, 2004 4:48 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Portal - coplet instance data attributes
> 
> I'm noticing that the mapping file for copletinstancedata 
> specifies that AttributesFieldHandler should be used.  I 
> haven't used Castor much, but it seems I could make a simple 
> change to that class to make sure it gets only the attributes 
> from copletinstancedata when necessary.  If so, would that 
> fix the problem?  I could then make the copletinstancedata 
> getAttributes and getAttribute methods use the lists in 
> copletinstancedata and copletdata.  That would minimize the 
> amount of code I'd need to change in other classes.
> 
> I guess the real question is, does Castor retrieve the data 
> through the AttributesFieldHandler class when building the XML?
> 
> Ralph
> 
> 
> Carsten Ziegeler said:
> > Hmm, I really can't remember everything. Now one problem 
> was that if 
> > you save the objects to XML, you can't save all available 
> attributes 
> > for the instance. You have to filter and only save the 
> attributes that 
> > are part of the instance and not those of the coplet data.
> >
> > An additional problem is removing of attributes etc. What 
> do you do if 
> > the attribute you want to remove is not an attribute of the 
> instance?
> > Do you delegate it to the data object? And so on.
> > Now, rethinkink everything, perhaps the simplest solutions 
> is to leave 
> > everything as it is and only add a "get value from all attributes 
> > method", which is just a getter method that first looks in the 
> > instance and then in the coplet data object. But for setting and 
> > removing everything could be left unchanged.
> >
> > HTH
> > Carsten
> 
> >
> 
> 

Reply via email to