-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello !
I have a list of entries in a listbox an when the user doubleclicks I want to open a new browser window
with a new zul file which belongs to my current desktop. All works fine as long as I do not try to
open a new browser window / new page.
public void onDoubleClick$lbForwarded( Event e) { MdbUserForwardedWithBLOBs forwarded = (MdbUserForwardedWithBLOBs) lbForwarded.getSelectedItem().getAttribute("data"); Executions.getCurrent().sendRedirect("newPage.zul","_blank"); }
The new browser window opens, but the created page "newPage" does not belong to the same desktop, so I cannot share data etc.
Kind regards
/Horst
I think you can add parameters to your url, say newPage.zul?p1=v1&p2=v2&..pn=vn or use Executions.createComponents method
HTH
Hello YamilBracho!
that is not the question. For my application it is very important to share the desktop to access state beans etc.
The problem is not to open an independent browser window. I want a new page as a element of the
current desktop opened in a new browser window.
How can Executions.createComponents open a new browser window?? May I do not understand the API....
Horst
Hi, Horst,
one desktop only belong to one browser/browser tab, a url.
you could not share same deskotp to different tabs/browsers.
can't you use a popup(model) window to instead?
or share the status bean in session, not desktop.
Hi Dennis,
you confirm my fear. I use popups at the moment and it works fine. But the customer
would prefer to open it in a new browser tab/window. The reason is quite simple. The window
contains some information and sometimes will be printed (later).
In some situations I really wish one ZK Desktop could hold its pages on different browser
tabs or windows.
Kind regards
Horst
Hello Henri!
Yes, I just started to render a simple page to print, i found no other solution.
But it is additional work to be done.
Further I now use getSession().getNativeSession().g|setAttribute() to share data between different browser tabs/windows.
As each of this extra browser tab/window are linked with its own desktop object I have no simple way
to update a page if some data changes for example by posting events, so I have started to implement some polling activities to link different desktops of one native session and queue events from one desktop to the other :-( (M
And the extra desktops implies extra memory allocation on my server, too. Some of my customers use to have a lot of browser tab/windows open the same time so that may have an impact in the future when more users will work with that application.
I am just a user of ZK and I know almost nothing about the zk engines and implementation.
Is it impossible in principal to share a desktop among different browser tabs/windows?
Kind regards
/Horst
Horst.
You can not share a desktop among different browser/tabs.
Maybe you should to search/read document about 'server push' to synchronize UI with data between desktops.
Hi Dennis!
Thank you! Yes that is exactly my approach. I store my data to exchange between different desktops belonging to the same native sessions in native sessions attributes. Each Desktops pools periodically if native session data has changed (timestamp) an then I update the pages by server push. My fault was that I took the desktop as what the native session is an I did not really recognize that page is NOT a browser tab/window. To me it was a natural expectation that all browser windows belonging to the same native session share one desktop. Maybe that should be explained in more detail here
My prototype/proof of concept works fine but it requires far more bookkeeping and controlling to build a more general framework.
I still think that this would be a nice ZK feature.
Kind regards
/Horst
Horst,
Although I think share desktops will break some core assumption, but maybe we will find the solution in the feature.
so, please post it to feature request anyway.
Hello Dennis,
what is that core assumption you talk about, can you share this with the community?
When I saw the image with the desktop and two pages and read that each page represents one url I associated this with one session, one desktop and two pages as two independent browser tabs.
Kind regrads
Horst
Asked: 2008-12-07 12:23:14 +0800
Seen: 1,294 times
Last updated: Dec 18 '08