You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dave <ja...@yahoo.com> on 2005/10/05 02:21:52 UTC

display a message without refreshing the whole page

MSN web messenger uses Web Browser to display message, but it does not refresh whole message area, just adding new messages. I am trying to understand how it works using HTTP web browser. It is great for many applications, for example, Email web client show up new messages without refreshing the whole message list window. Is it possible with JSF?
 
Thanks, Dave

		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: display a message without refreshing the whole page

Posted by Simon Kitching <sk...@obsidium.com>.
Dave wrote:
> MSN web messenger uses Web Browser to display message, but it does not 
> refresh whole message area, just adding new messages. I am trying to 
> understand how it works using HTTP web browser. It is great for many 
> applications, for example, Email web client show up new messages without 
> refreshing the whole message list window. Is it possible with JSF?

There are several ways to achieve this:
* Use HTML frames. Only one frame needs to be reloaded
* Use an applet to display the varying data
* Use an ActiveX control or similar
* Use the AJAX approach

I would guess that MSN are using AJAX. Modern browsers provide an 
XMLHttpRequest object that javascript can use to send a message to a 
server and receive a response. The javascript can then update the page 
by manipulating DOM objects. Effectively, you can write traditional 
client-server applications using HTML/Javascript as the front end.

Writing apps in the AJAX manner is pretty new, so docs and tool support 
is uneven. There are a few JSF tags that generate AJAX style code; check 
the myfaces site.

Google for AJAX for more info.

Regards,

Simon