-
1. Re: Anchor-based AJAX navigation in Seam
donakalz Aug 19, 2010 2:58 AM (in response to luiggitama.luiggitama.gmail.com)Bump!
I would also like to know if this is possible and how to achieve it. I have integrated XMPP IM in my seam app. Logged in users can see a bar positioned at the bottom of the browser viewport (not the bottom of the document). By positioning the div as fixed, the chat bar stays at the same position regardless of scrolling. This bar is just like that found on facebook except that its missing one thing. The bar loses its state when pages are navigated due to the reload of entire content. Using firebug, I could see that facebook links have anchors as the hrref. Furthermore, link clicking is intercepted by javascript and the target payload is fetched using XmlHttpRequest and the page is updated accordingly without a reload. I would like to know if this would be an issue in a seam app. As the previous poster said, what best practices do you recommend?
By pondering, If I were to proceed, I might want to replace all my links which perform page reloads currently (such as links in the menu bar) such as regular a tag, h:outputLink and so on to, to a4j:commandLink and use a nested a4j:support tag to reRender content with an id such as
body
once the event, oncomplete is fired. I would want to use facelets to enable me logically divide my page into header, menu, body, footer and perhaps, chatbar. Therefore its the body part of the facelets which gets reRendered on those link navigations. Therefore this might keep the chatbar from reloading all the time? Does the line of thought above make any sense?I am using seam 2.2.0 GA, Richfaces 3.3.3GA, JBoss AS 5.1 GA.
Thanks in advance.