Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/Jun/2007 10:32:24
|
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?
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/Jun/2007 15:25:13
|
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:
tag in your navigation rule.
regards
mike
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/Jun/2007 20:45:16
|
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.
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/Jun/2007 20:45:25
|
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>
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/Jun/2007 21:06:11
|
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".
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/Jun/2007 21:36:04
|
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.
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 14/Jun/2007 02:13:28
|
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 />
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 14/Jun/2007 14:39:31
|
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?
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 15/Jun/2007 01:21:54
|
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?
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 15/Jun/2007 14:00:11
|
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.
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 19/Jun/2007 10:27:25
|
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?
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/Jun/2007 02:43:43
|
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
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/Jun/2007 07:01:46
|
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?
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/Jun/2007 14:47:54
|
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.
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 21/Jun/2007 01:17:37
|
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?
|
|
 |
|