voyent
icefaces is not fully ajax enable. It is just component ajax enable.  XML
Forum Index -> Portals & Portlets Go to Page: 1, 2 Next 
Author Message
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline


Actually what i found icefaces is not fully jsf ajax. It is because it do not support page ajax refreshing. Which means when i click the menubar, the content of facelet will change and not whole page. Anyone know how to do that?
michael.thiem


Joined: 04/Jun/2007 00:00:00
Messages: 704
Offline


hi,

generally every component on the page which needs to get updated will be updated, as long as you use

Code:
 <ice:form partialSubmit="true">
 ...
 </ice:form>
 


within your jsf code. If you want to initiate a refresh of your page you would have to use an action with an outcome pointing to a corresponding navigation rule in your faces-config.xml file. If you use this, you should be sure to use the

Code:
 </redirect>
 


tag in your navigation rule.

regards
mike
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


ICEfaces works by rendering the server output to a DOM tree, and sending DOM differences over the XmlHttpRequest connection to the browser. It is a full AJAX solution, with no need to define update relationships. You shouldn't have to do anything to make this work.

What you can try is pressing CONTROL-SHIFT-T in your browser, once you've loaded your web application in your web browser. That will bring up a debug console in the browser. Click on whichever menu item. Copy & paste the results from there into here. As well, look in your server log for any messages or exceptions.
[Email]
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline


With the partialSubmit attribure and the redirect in navigation rule, It will change the whole page. I just want partial page render. Just the content will be refreshed. How to do that?

Banner
_________________
MENU |
MENU |
MENU | Content
MENU |
MENU |

There will be content 1 - 7 in the following format.
Code:
    <ui:decorate template="/pages/templatesWithBannerNMenu.xhtml">
         <ui:define name="content">
 ........
 ........    content 1
        </ui:define> 
    </ui:decorate>
 
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline



It is a full AJAX solution, with no need to define update relationships. You shouldn't have to do anything to make this work.
 


How the icefaces know that the html from server is used to replace the banner or the content? IF "You shouldn't have to do anything to make this work".
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


The render can be initiated from the client end by a user interaction like a mouse click or key press, or from the server end via our AJAX push API.

The specific snippets of html rendered have embedded IDs, which the javascript bridge code running on the borwser will use to know where each update should go in the browser's DOM.
[Email]
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline


1)Do you have any example which will use jsf navigation rule to do partial page render?

2)it maybe base on div tag id so how to manually tell the icefaces to use login.xhtml to replace to <div id=loginSpace />
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


jimmy6 wrote:
1)Do you have any example which will use jsf navigation rule to do partial page render?

2)it maybe base on div tag id so how to manually tell the icefaces to use login.xhtml to replace to <div id=loginSpace /> 


Sorry, I think I misunderstood you at first. Your problem is that the whole page is refreshing, and you only want the content to refresh? Do you see a noticeable flicker in the menu? Or are you seening the logged updates, and wanting to minimise bandwidth?

I think Michael was confused like me, since he was describing using a navigation rule to force a full update, which is not what you want, if you just want a targetted update.

Am I now correct in what you want?
[Email]
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline


Ya, you are correct now. Just the content to be refresh. Thus, how to do that with and without navigation rule?
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


Ok, so first off, you do not want to use the redirect tag in your navigation rule.

Next off, instead of navigating from one page to another, where they both decorate a common template page, you might want to stay on the same page, but use the menuItem's actionListener to change content via a dynamic ui:include for the content. This way you're just doing a long-lived request of the same page, so the ids for the banner and menu sections will remain the same, and so will probably not be resent to the client.

The caveat with this is that the user can't bookmark each individual page, since they'll all have the same URL.
[Email]
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline



Ok, so first off, you do not want to use the redirect tag in your navigation rule.
 

I have tried this method, even the url is still remain the same but the whole page will be refreshed also. So how?

Second method
How to change content via a dynamic ui:include for the content?
michael.thiem


Joined: 04/Jun/2007 00:00:00
Messages: 704
Offline


If you don't use the redirect tag within your faces-config.xml the url will always remain the same in your browser window. The difference when using the redirect is that the current request will be terminated and a new request response cycle will occur.

You can find a very good documentation on how to use facelets under

https://facelets.dev.java.net/nonav/docs/dev/docbook.html

- michael
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline


If it is just url remain but the whole page will be refresh, then what is the purpose to just remain the url?
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


With the dynamic ui:include, the whole page should not update. If you look at the Facelets build of the component-showcase, all the content on the right is from a dynamic ui:include, while the tree on the left is not re-downloading.
[Email]
jimmy6

Joined: 01/Jun/2007 00:00:00
Messages: 10
Offline


Which means the partial page refresh is because of the facelets ui:include and not panel stack right?
 
Forum Index -> Portals & Portlets Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team