GX2019: one id on two elements of a component
Two elements of one component have the same static id.
Cause
An id names one element of a document. With one id on two elements, a label for, a link to #intro and a patch of Gx reach only the first one.
Gx gives no finding for two elements in two branches of one if or switch: one render holds one of them.
Example
package page
<main>
<section id="intro">One</section>
<section id="intro">Two</section>
</main>gx check reports:
page/Page.gx:5:3: GX2019: the id "intro" is on two elements of the component: an id names one elementFix
- Give each element its own id.
- For an element in a loop, use a keyed fragment:
<li #row(key string) key={key}>. Gx then makes one id for each key.