Uploaded image for project: 'ZATS'
  1. ZATS
  2. ZATS-15

Pseudo class selectors are not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Normal Normal
    • None
    • 1.0.0
    • Mimic
    • ZK 6.0.0

      According this doc: http://books.zkoss.org/wiki/ZATS%20Essentials/Getting%20Started/First%20Mimic%20Test%20Case
      ZATS supports all CSS3-like pseudo-class selectors as described here:
      http://books.zkoss.org/wiki/Small_Talks/2011/January/Envisage_ZK_6:_An_Annotation_Based_Composer_For_MVC
      and even better here:
      http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/MVC/Controller/Wire_Components#Pseudo_Class

      But in practice, at least :first-child and :nth-child() does not work at all, they do not select anything.

      ZATS query:
      desktop.query("#my_window listbox > listitem:first-child > listcell:first-child").as(Listcell.class).getLabel()

      ZUL:
      <window id="my_window"
      <listbox ....>
      <listhead>
      <listheader label="Name" />
      </listhead>
      <template name="model" var="user" >
      <listitem>
      <listcell label="@load(user.name)" />
      </listitem>
      </template>
      </listbox>
      </window>

      And this same query that does not use pseudo-classes works fine:
      desktop.queryAll("#my_window listbox > listitem" ).get(0).getChildren().get(0).as(Listcell.class).getLabel());

            paowang paowang
            m17 m17
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: