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

<style> makes selector cannot find components

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Normal Normal
    • None
    • None
    • Mimic
    • None

      copied from google code issue.

      Problem Description

      Steps to reproduce
      1. prepare a zul file that contains <style> tag, like .z-listcell.red .z-listcell-cnt, .z-label.red

      { color:red; }
      <zk>
      	<style>
      		.z-listcell.red .z-listcell-cnt, .z-label.red{
      			color:red;
      		}
      	</style>
      	<window id="searchWin" title="Search Storage Item" border="normal" width="600px">
      		A zul that contains style tag causes selectors problems.
      		<vbox hflex="true">
      			<hbox>
      				Filter : 
      				<textbox id="filterBox" value="*" /> 
      				<button id="searchButton" label="Search" />
      			</hbox>
      		</vbox>
      	</window>
      </zk>
      

      2. Searcher.find("#filterBox") return null
      3. Until I remove <style> tag , Searcher can find components.

      There is no such problem when using @Wire with SelectorComposer.

      This issue only occurs when <style> is at beginning, no happen when we put <style> at the end of zul.

      #id not work, but select by "tag" still works, e.g.:
      Searcher.find("#filterBox") // null
      Searcher.find("window") // correct

            paowang paowang
            paowang paowang
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: