<ui:include src Dynamically load file issue
sandeepgowda Mar 15, 2010 2:50 PMHi,
I am attached the code below, the component <ui:include, where SRC value change dynamically, but the browser is not getting reflected.
only on browse Refresh(press of F5),its working, please help me in fix.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<head>
<title>Customer Details</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
.cols {
vertical-align: top;
width: 50%;
}
</style>
</head>
<body>
<h:form id="form">
<h:panelGrid columns="2" columnClasses="cols" width="100%">
<rich:panelMenu style="width:200px" mode="ajax"
iconExpandedGroup="disc" iconCollapsedGroup="disc"
iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
iconCollapsedTopGroup="chevronDown">
<rich:panelMenuGroup label="Asset and Liability ">
<rich:panelMenuItem label="Asset"
action="#{MainPanel.onAssetSelection}" reRender="selectedPanel">
<a4j:support event="oncomplete" reRender="selectedPanel" ></a4j:support>
</rich:panelMenuItem>
<rich:panelMenuItem label="Liability"
action="#{MainPanel.onLiabilitySelection}"
reRender="selectedPanel">
<f:param name="strCurrent" value="/Jsf/SearchCustomer.xhtml" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
<rich:panelMenuGroup label="Group 2">
<rich:panelMenuItem label="Item 2.1">
<f:param name="strCurrent" value="Item 2.1" />
</rich:panelMenuItem>
<rich:panelMenuItem label="Item 2.2">
<f:param name="strCurrent" value="Item 2.2" />
</rich:panelMenuItem>
<rich:panelMenuItem label="Item 2.3">
<f:param name="strCurrent" value="Item 2.3" />
</rich:panelMenuItem>
<rich:panelMenuGroup label="Group 2.4">
<rich:panelMenuItem label="Item 2.4.1">
<f:param name="strCurrent" value="Item 2.4.1" />
</rich:panelMenuItem>
<rich:panelMenuItem label="Item 2.4.2">
<f:param name="strCurrent" value="Item 2.4.2" />
</rich:panelMenuItem>
<rich:panelMenuItem label="Item 2.4.3">
<f:param name="strCurrent" value="Item 2.4.3" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
<rich:panelMenuItem label="Item 2.5">
<f:param name="strCurrent" value="Item 2.5" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
<rich:panelMenuGroup label="Group 3">
<rich:panelMenuItem label="Item 3.1">
<f:param name="strCurrent" value="Item 3.1" />
</rich:panelMenuItem>
<rich:panelMenuItem label="Item 3.2">
<f:param name="strCurrent" value="Item 3.2" />
</rich:panelMenuItem>
<rich:panelMenuItem label="Item 3.3">
<f:param name="strCurrent" value="Item 3.3" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
</rich:panelMenu>
<h:panelGroup id="selectedPanel" rendered="true">
<rich:panel bodyClass="rich-laguna-panel-no-header">
<a4j:outputPanel ajaxRendered="true">
<ui:include src="#{MainPanel.strSelectedPath}"></ui:include>
<h:outputText value="#{MainPanel.strSelectedPath}" id="Current" />
</a4j:outputPanel>
</rich:panel>
</h:panelGroup>
</h:panelGrid>
</h:form>
</body>
</html>
regards
Sandeep