Hi Martin
> Betreff: Re: [Zope3-Users] z3c.form: LookupErrors


> What I'd like to see:
>  1) z3c.form catches the LookupError and treats it as a 
> valdiation error (even on first render of the form), not a fatal error

seems Ok to me

>  2) z3c.form defaults to missing_value if there is a 
> LookupError against what the data manager returns. The value 
> is indeed "missing in action"

agreed, but that's what the object attribute should do too.

>  3) If possible, we output the offending value in the error message

the value doesn't make sense. Normaly the vocabulary abstracts
the value for presentation within a term.title. The term values
are often abstract placeholders, translation bases or something
else like a principal id. The useful title isn't available for
legacy values. Or often a translation for a value also get
removed if a possible value get reomved from the system.

>  4) In use cases where it makes sense, people can use a field 
> property implementation that checks the source and returns 
> the default (or something else) if the value can't be found. 
> That's not for z3c.form to decide or depend on though.

I absolutly agree. Right know I think the current Choice, source,
vocabulary and term including i18n concept will only fit if we
do not produce legacy data.

A realy working Choice/vocabulary/widget implementation whould
require the we keep the information we need for build terms for
legacy data. This part is absolutly missing in the current concept
and makes it impossible to implement a general solution.

But I still agree, the UI should not crash ;-)

Roger Ineichen

> Martin

Zope3-users mailing list

Reply via email to