I would like to refresh a part of my template using jquery. In my template.xhtml , i have this: `
<h:body>
<div id="topbar">
<ui:include src="topbar.xhtml" />
</div>
<div id="layoutmenu">
<ui:include src="layoutmenu.xhtml" />
</div>
`
In my page.xhtml :
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:sec="http://www.springframework.org/security/tags"
xmlns:f="http://java.sun.com/jsf/core"
template="/WEB-INF/template.xhtml">
I try to refresh the topbar but when i use this code all the page is refreshed and my menu doesn't work anymore (click event ...). I use this code to load the same div in my controller because i want to refresh my topbar then only reinclude the same file :
RequestContext.getCurrentInstance().execute("$('#topbar').load('#topbar');");
i didn't find a solution in all the documentation i read.The solutions aren't appropiate to my case because i dont want to change the included file but to refresh the same one which is a part of my template but everything is refreshed
I don't want to use a commandlink or commandbutton i juste want to reload the topbar div in my template.xhtml.This is for my currentuser notification. if someone can help me it will be very nice :)