cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: CForms widget ID naming (was Re: [Vote] Releasing on friday)
Date Fri, 04 Nov 2005 11:38:53 GMT
Sylvain Wallez <sylvain <at>> writes:

> > Sorry to go back to the origin of this discussion, but wouldn't it then be
> > better to generate an id for the ajax wrapper element instead of the input
> > element? Nobody cares about the wrapper element, but nearly everybody about
> > the styling of the form and so the inputs. So giving them the id they have in
> > the form definition seems to be more than obvious.
> So you suggest:
>   <span id="foo:container"><input name="foo" id="foo"></span> ?


> Ajax cares *alot* about the container id, as it's the element that is 
> updated.

Of course it does, I did not question this. But the CForms user don't care about
which id the container has.

> If the container's id isn't the widget's full name, it means 
> we'll have to take into account this special naming for HTML rendering 
> of widgets everywhere

Can't follow you? What do you have in mind?

> My impression (but that's only mine) is that access to individual inputs 
> is mostly needed from JS code (to plug some additional behaviour) rather 
> than from CSS (use classes to style globally rather than individually), 
> so the unicode escape quirk is should not really be an issue.

The manipulated input id might be a minor issue. But if it is possible to avoid
the manipulation at all, we should do it. So you probably just need to explain
why the container id should be the widget id for simplicity.


View raw message