I really don't want to start this discussion all over again, but I have
to disagree with you Martijn.

If I develop a closed component I can skip the id attribute completely
by using the wicket attribute. That way the user can use any id's he
likes and not worry about id's I used in my component. And since id
attributes are not required by w3c the browser will uniquely id the
elements of my components for me.

The only drawback is that the user can't use scripting to access html
elements in my component without me supplying some way to assign an id
to an element.

Maurice

-----Oorspronkelijk bericht-----
Van: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Verzonden: woensdag 16 februari 2005 16:22
Aan: [email protected]
Onderwerp: Re: [Wicket-develop] id of elemets and listviews


Juergen Donnerstag wrote:

>would that number be unique per page, container or component?
>
Per page. The count is unique per rendered page.

>In order to be w3c compliant they'd need to page unique, correct? I
guess a
>disadvantage would be that you can hardly change your design (you'll
>change the numbers) without having to (manually) change you CSS / JS
>selectors. Which obviuosly is true for the original naming algorithme
>as well.
>
This is an error in the design already. When you use the wicket
component ID's for selecting a component which can be used multiple
times in your page, you are already in trouble: the components ID is not
unique. In CSS you are misusing the ID as a class identifier, and I
don't know what the consequences are in Javascript, but I figure they
aren't good.

ID generation is something Wicket should do, and not leave it to the
developer of the applications. Like I already stated in a previous
message, when you are a component developer, you can't possibly foresee
what kind of usage your components will have. So as a component
developer you can't generate ID's according to your own rules. Wicket
generates the final page and composes it from its added components, so
Wicket has the information to make the IDs unique for each page. Nobody
else has this knowledge: 
 - not the developer who created the page, as he/she has no control over
the components which are developed by other developers (our licensing
doesn't prohibit commercial, closed source components!)
 - not the developer who creates the supplemental components (the date
picker for example), as he can't control what naming schema his
components will recieve.

Martijn




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to