Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2267

Popup is only sometimes "visible" when it is opened

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.6, 7.0.2
    • 6.5.2, 7.0.1
    • Components
    • Security Level: Jimmy

      currently it not always possible to check if a Popup is currently open or not

      The "visible" of the Popup is only set in the Popup::service() method, when the client posts an "onOpen" event Popup.java line 179
      Using one of the Popup::open(...) methods does not set the visible state of the popup. In that case there is no way to check the current Popup status (e.g. when testing a page with ZATS see(ZATS-43))

      <zk>
      	click labels an check the server log for visible state of the popup
      	<vlayout>
      		<label value="CLICK for popup using default mechanism" popup="defaultPopup"/>
      		<label value="CLICK for manually opened popup" onClick='manualPopup.open(self);System.out.println(manualPopup.isVisible())'/> <!-- shows false -->
      	</vlayout>
      
      	<popup id="defaultPopup" onOpen="System.out.println(self.isVisible())">
      		<label value="in default Popup"/>
      	</popup>
      	<popup id="manualPopup" onOpen="System.out.println(self.isVisible())">
      		<label value="in manual Popup"/>
      	</popup>
      </zk>
      

      the javadocs say visible should not be used for that, so an alternative like isOpen would be preferable

            jumperchen jumperchen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: