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

Notification diappears when displayed in onCreate event of modal Window

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 6.0.1
    • Fix Version/s: 6.5.0
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Notification.zul

      <zk>
      	<window id="win_main" title="Hello Notification!!" border="normal" width="100%">
      		<vlayout spacing="2px">
      			3° ISSUE: click OPEN WIN MODAL BUTTON to open modal Window; after opening the window, I would like to give user a message but as you can see the Notification (with duration and without duration)  DISAPPEAR IMMEDIATELY!! For me this is this is a problem!  
      			<separator spacing="10px"/>
      			
      			<toolbarbutton label="open win modal">
      				<attribute name="onClick">
      						<![CDATA[					        
      							Window win = (Window) Executions.getCurrent().createComponents("win_modal2.zul", null, null);
      							win.doModal();
      						]]>						
      					</attribute>	
      			</toolbarbutton>
      		</vlayout>
      	</window>
      </zk>
      
      <zk>	
      	<window id="win_modal" title="win modal!!" width="924px" height="568px" border="normal" closable="true">
      		<attribute name="onCreate">
      			<![CDATA[
      				Clients.showNotification("ok 1", Clients.NOTIFICATION_TYPE_INFO, win_modal, "top_right" ,-1);
      				Clients.showNotification("ok 2", Clients.NOTIFICATION_TYPE_INFO, win_modal, "top_left" , 3000);
      			]]>						
      		</attribute>
      		<checkbox label="check this"/>
      	</window>
      </zk>
      

      Expected: Notification stays as long as time duration specified or manually dismissed.
      Actual: Notification disappears immediately after modal window is displayed.
      Note: in Window doModal the focus switches to Window widget at the end that causes the Notification to be closed.

        Attachments

          Activity

            People

            Assignee:
            vincentjian vincentjian
            Reporter:
            ashishd ashishd
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: