> Betreff: Re: AW: [Zope3-dev] Re: [Checkins] SVN:
> z3c.form/trunk/src/z3c/form/HTMLelement ids containing dots
> are not very good, because then the
> On Jun 5, 2007, at 3:28 AM, Roger Ineichen wrote:
> > Hi Stephan, Gary, Marius
> Hey Roger
> > Agreed, we can't use different names and ids!
Hm, since I talked to Stephan and he was showing me some
usecase. I'm not sure about my concerns anymore.
Right now Stephans last changes define dashes as separators
for ids and dots for names. e.g.
<input type="checkbox" id="widget-id-0" name="widget.name:list"
class="checkBoxWidget" value="yes" />
Since I was taking a close look at the pattern we used in the past
for the different ids and names, I'm sure, that different ids and
names is not a problem. At least not one that we run into ;-)
We used different namings for names an ids in many widgets. The
sample above shows one of them:
Or the RadioWidget uses also id="foo.bar.0" where the 0 (zero) is
the counter and the name is name="foo.bar" which reflects the
radio field grouping.
Did I miss another important point?
> > Any reason for using dot prefix for our prefixes? If not I
> propose to
> > skip the additional dots which are only beautifiers.
> > What do you think?
> In the past we have wanted the dots to effectively guarantee
> page component "namespaces". For instance, if a widget or
> viewlet or whatever wants to draw a few form fields, or a few
> uniquely addressable ids, then it needs to know that what
> pattern is safe to use. since our field names are Python and
> dots are natural
> delimiters there, a dot could guarantee that we didn't have
> For instance, we do have Python packages with camelCase
> attribute names out there; if we used your camelCase
> proposal, then there would be no way to distinguish between
> lastName--a field named 'lastName'-- and lastName--a field
> named last with a widget that wants to draw a separately
> addressable HTML part of "name".
Yes, I agree, that was not a good idea from me. Another imporant
point we discusses is the following. If we get a JSON call or another
XML-RPC call from a client, the client gives use probably the
field ID or name. After that, we have to lookup and build some
infrastructure for get the the widget value. For this it's important
to split the name or id by it's separator.
> Zope3-dev mailing list
Zope3-dev mailing list