[Checkins] SVN: z3c.form/trunk/ Initialize the field widget manager

Roger dev at projekt01.ch
Tue Oct 30 14:30:00 UTC 2012


Hi Malthe

Why are you changing the API when you can do that without an API change?

Could be that I don't fully understand wha the real problem is.
But doesn't this work without to move the IWidgets adapter
lookup to the update method?


I'll take a look at this tomorrow. Probably I'll find
another way to dothis without to break all updateWidget
customizations.

I'm pretty sure any cusomization in any form which
does an additional updateWidget call for update
will get into trouble because the widget don't get
initialized anymore with probably different widgetFactory
for a given mode (e.g. input, display)


Probably the difference between our point o view is that you
think the IWidgets setup is basic and not a part of a
customization, right?

But the IWidgets adapter setup is a fundamental
part oft he customization and has to be done on any 
widget update call too.

Remember, the IWidget adapter setup is nothing hardcoded.
That's a customization hook itself and must depend on the
form itself and other components whcih could change during
the form update call.

Reards
Roger Ineichen
_____________________________
END OF MESSAGE


> -----Ursprüngliche Nachricht-----
> Von: Malthe Borch [mailto:mborch at gmail.com]
> Gesendet: Dienstag, 30. Oktober 2012 15:12
> An: dev at projekt01.ch
> Cc: Adam GROSZER; Checkins at zope.org; Stephan Richter
> Betreff: Re: AW: [Checkins] SVN: z3c.form/trunk/ Initialize the field widget manager
> 
> On 30 October 2012 14:46, Roger <dev at projekt01.ch> wrote:
> > I do not understand what you are trying to solve. Can you describe
> > your Problem with the previous implementation?
> 
> I'm trying to solve the problem of changing the widgets prefix in a
> reasonable way.
> 
> Previously, the widgets component lookup and the update step was
> together, so you had no chance to adjust or set the prefix.
> 
> With my change, ``updateWidgets`` does exactly that: update the
> existing widgets.
> 
> > The widget setup in update is very bad because this now get
> > called in the super call order now.
> 
> Why don't you just move the fields setup to your ``update`` method?
> 
> I understand that it's an API change and that some implementations
> will need a migration, but it's relatively minor. You just need to
> shift your fields setup code to the ``update`` method.
> 
> \malthe




More information about the checkins mailing list