0

asynchronous events to component desktops

asked 2013-02-18 17:36:43 +0800

danzanzini gravatar image danzanzini
3 1

Hi,

I'm working in a multiple-user system.

In some places of the system I use data created by the user in comboboxes or listboxes.

If there are simultaneously users, and one of them creates a person on the DB, for example, and another user is using a component that uses a combobox with all persons, I want to update that combobox, asynchronouly.

I've looked at Event queues but I stopped when I saw this: "On the other hand, an asynchronous listener is executed asynchronously in another thread. It can not access the components belonging to any desktop."

Is there any way I could achieve this?

Thanks in advance

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-18 10:18:14 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6
http://www.hybris.com/

updated 2013-03-18 10:21:14 +0800

You have 3 options: 1 - Comet server push - only for ZK EE or PE 2 - a Timer that checks if any new option for your combos was created and in case triggers the refresh Of course the Timer delay as to be tuned in order to be efficient for the user and sustainable for your back end.

The third way can be a dirty workaround on the EventQueue - where you register all the listeners that tries to register themselves for a given queue on a static map - and everything you want to post an event... you can parse the map and dispatch your cross-desktop event through all the different registered listeners. I did in the past and it was workin - then i bought the EE lincence and that piece of code was put in the cave. Its main problem was to keep it clean during time to avoid leaks! So i was more than happy to put it in my cave! :D

Gio

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

Follow
1 follower

RSS

Stats

Asked: 2013-02-18 17:36:43 +0800

Seen: 18 times

Last updated: Mar 18 '13

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