Dejell
Dejell

Reputation: 14317

communicate between two web browsers instances in jsf

HI

I need to embed two web browsers in one form of a windows application (design wise, I have to separate them).

I also need to "communicate" between both - when the user clicks on a button in one web control, I have to disable a component in the other one.

I thought of using ajax:poll and push from primefaces, but I think that it's too expensive for network to keep a page on ajax:poll with intervals of 100 constancy.

Is there another way that you suggest to me?

Upvotes: 0

Views: 616

Answers (3)

BalusC
BalusC

Reputation: 1109122

HTTP polling or pushing are really the only resorts. Pushing is more efficient and suitable for this case. The PrimeFaces p:push makes use of Atmosphere under the hoods which is a pretty awesome concept. It is basically a transparent layer over all the various technologies known for HTTP push (CometProcessor, Grizzly Comet, Servlet 3.0 Async, Websockets, etc) and it automatically picks the right and best one whichever available.

Unfortunately the currently latest PrimeFaces version 2.1 doesn't work well with the currently latest Atmosphere version 0.6.x. You need Atmosphere 0.5.x until the PrimeFaces guys catches up the newer Atmosphere version.

See also:

Upvotes: 0

Paul Whelan
Paul Whelan

Reputation: 16809

Have look into Ajax Comet programming. Seems to be exactly what you need.

Upvotes: 1

Erik B
Erik B

Reputation: 42594

http://dev.w3.org/html5/websockets/

I'm not sure if the browsers support this yet, but when they do it could be the solution you're looking for.

Upvotes: 0

Related Questions