cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers" <Ralph.Go...@dslextreme.com>
Subject RE: Portal - coplet instance data attributes
Date Tue, 26 Oct 2004 14:48:08 GMT
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

>


Mime
View raw message