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

onBookmarkChange isn't triggered on sendRedirect with 7.0.6.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.1
    • 7.0.6
    • None
    • Security Level: Jimmy
    • None

      Issue has been redefined after investigation:
      onBookmarkChange isn't triggered on sendRedirect with 7.0.6.1

      Steps to reproduce:
      Download attached files and change java classes packages to match project settings.
      update init in page1.zul
      update composer in target.zul

      navigate to target.zul
      >target.zul includes page1.zul
      >page1.zul send a redirect instruction which change bookmark.
      >on 7.0.5.2 and lower : triggers the onBookmarkChange listener and changed included page to page2.zul
      >on 7.0.6 and higher: does not triggers onBookmarkChange and stay on page1

      Initial description
      h2. Steps to Reproduce
      # run attached zhtml page with initiator

      public class RedirectInit implements Initiator {
      
      	@Override
      	public void doInit(Page page, Map<String, Object> args) throws Exception {
      		
      		Executions.sendRedirect("target.zul");
      	}
      }
      

      web.xml
      	<servlet>
      		<description>ZK loader for ZUML pages</description>
      		<servlet-name>zkLoader</servlet-name>
      		<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
      		<init-param>
      			<param-name>update-uri</param-name>
      			<param-value>/zkau</param-value>
      		</init-param>
      
      		<load-on-startup>1</load-on-startup>
      	</servlet>
      	<servlet-mapping>
      		<servlet-name>zkLoader</servlet-name>
      		<url-pattern>*.zhtml</url-pattern>
      	</servlet-mapping>
      

      # visit the zhtml page

      h3. Actual Result
      The browser is not redirected to the target page.



      h2. Debug Information
      5.0.0 and 5.0.1 doesn't have this issue.
      Since 5.0.2 has the issue.
      Initiator works correctly on a zul page.

        1. target.zul
          0.2 kB
        2. RedirectInit.java
          0.4 kB
        3. page2.zul
          0.0 kB
        4. page1.zul
          0.1 kB
        5. myComposer.java
          0.6 kB

            jumperchen jumperchen
            pviceic pviceic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m