plone.supermodel ChoiceHandler terms with titles?

1 view
Skip to first unread message

Sean Upton

unread,
Apr 16, 2014, 1:18:26 PM4/16/14
to dexterity-...@googlegroups.com, thomas desvenain, David Glick (Plone)
I am working on an attempt at fixing
https://github.com/plone/plone.app.dexterity/issues/49 --
incidentally, I am working on writing tests for ChoiceHandler, which
has me noticing a few inconsistencies in term construction [1].

Since Thomas was expressing interest in schema editor supporting terms
with titles, I was pondering implementing this. How should this best
be done to preserve backward-compatibility? I suspect something like
<element title="This">this</element> where the default parsing would
set term title equal to term value when None is provided. Doing this
might require modifying BaseHandler.read(),
ChoiceHandler._constructField(), and ChoiceHandler.write().

Thoughts?

Sean

[1] The inconsistency is that terms are constructed with
term.title==None in some cases, and term.title==term.value in others.
Reply all
Reply to author
Forward
0 new messages