how to reuse existing browser-tab to display new message

asked 2018-11-12 19:41:16 +0800

kulilin4659 gravatar image kulilin4659
3 2

updated 2018-11-13 11:14:37 +0800

Now have a requirement as follows: tick button in page A, it will create a new browser tab to show the page B message. go back to page A, tick others button, the page B message will be updated to page C message. can it implement in zk? please help me if someone know this, thanks you very much

delete flag offensive retag edit


are you talking about browser-tabs or tabbox-tabs?

cor3000 ( 2018-11-13 10:31:19 +0800 )edit

hello! it is browser-tabs

kulilin4659 ( 2018-11-13 11:07:47 +0800 )edit

do you want to update just the value of an existing label or open a new URL in the same tab?

cor3000 ( 2018-11-13 12:09:57 +0800 )edit

I want to open a new URL in the same tab

kulilin4659 ( 2018-11-13 13:19:09 +0800 )edit

thank you very much.I test successfully.

kulilin4659 ( 2018-11-13 19:14:34 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-13 17:49:56 +0800

cor3000 gravatar image cor3000
4406 2 7
ZK Team

updated 2018-11-15 12:30:58 +0800

to open a url in the same tab you have to use the same target frame name:


Executions.getCurrent().sendRedirect("pageB.zul", "myframe");

the above will open pageB.zul in a new browser tab (might require permission to open a popup)

Then the below will open pageC.zul in the same tab using the same frame name "myframe"

Executions.getCurrent().sendRedirect("pageC.zul", "myframe");

You can test this with this zkfiddle http://zkfiddle.org/sample/23nk51g/4-open-new-url-in-same-tab (as mentioned above you'll have to allow popups for this)


here an update demonstrating the difference between a server side triggered JS and client side JS http://zkfiddle.org/sample/23nk51g/7-open-new-url-in-same-tab

If the browsers prevents certain behavior from untrusted events then there's no way around it... just use a client side listener, instead of triggering JS from the server

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2018-11-12 19:41:16 +0800

Seen: 8 times

Last updated: Nov 15 '18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More