[Product-Developers] Re: ordering fields with schemaextender

Martin Aspeli optilude at gmx.net
Fri Jan 4 01:02:23 UTC 2008


Héctor Velarde wrote:
> Martin Aspeli wrote:
>> I suggest that you use the standard ISchemaExtender semantics to add new 
>> fields, and then use the ISchemaModifier to re-order a few fields at the 
>> end.
> 
> yes, that's what I'm trying right now but I think it wouldn't work. in 
> fact, Martin, ISchemaModifier doesn't implements ISchemaExtender but 
> Interface.
> 
> I think I need to add the fields in the fiddle method using the addField 
> method of the schema.
> 
> if you can document one example I can follow it.

Ah, I forgot - we divorced them.

I'd just register two adapters: one that adds new fields (with 
ISchemaExtender) and one that that modifies the results (an 
ISchemaModifier). I think this'll be easier, safer and faster.

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book





More information about the Product-Developers mailing list