valueChangeListener ignored inside a subview
Hi all !
I am curently working on a quiet complex website using jsf. So far, everything has been well but , as it was just the beginning, I coded without thinking too much.
So, I have a web page which uses tabs for navigation. At first I coded everything in the same jsp file. I have a h:selectonemenu which rerender a datatable in one of the tabs when a valuechange event occurs.
While everything is in the same page, it's all working correctly, but now that it's working i would like my code to be easier to maintain. Therefore, i split the jsp file into two parts : one contains the tabs, and the other the combobox and datatable.
I then included the second file in the first one with the jsp:include tag
It's here that my problem occurs. Now, the valuechangelistener which is normally called when a choice in the combobox is made isn't called anymore and i have no idea why.
Here is a partial code of the page :
index.jsp contains just the tabs and is not important for this problem (i think)
techs.jsp :
<f:subview id="tabTech">
<ui:form id="form1">
<ui:panelLayout binding="#{TabTech.layoutPanel6}" id="layoutPanel6" panelLayout="flow" style="background-color: #0b1d4f; width: 100%; height: 100%">
..........
<h:selectOneMenu binding="#{TabTech.CB_EscTech}" id="CB_EscTech"
immediate="true" title="#{EscalesManagedBean.title}" value="#{EscalesManagedBean.selectedOption}" valueChangeListener="#{EscalesManagedBean.processValueChange}" onchange="submit()">
<f:selectItems id="dropdown15SelectItems" value="#{EscalesManagedBean.listeEscales}"/>
</h:selectOneMenu>
<h:dataTable binding="#{TabTech.tableTech}" border="1" columnClasses="td" headerClass="list-header th"
id="tableTech" rowClasses="list-row-even td, list-row-odd td" styleClass="tableau"
value="#{TechniciensManagedBean.tech}" var="tech">
<h:column binding="#{TabTech.nomTech}" id="nomTech">
<h:outputText binding="#{TabTech.outputText41}" id="outputText41" title="null" value="#{tech.nomTechnicien}"/>
<f:facet name="header">
Nom
</f:facet>
</h:column>
..........
the valueChangeProcess method :
publicvoid processValueChange(ValueChangeEvent vce)throws AbortProcessingException{
String newValue = (String)vce.getNewValue();
System.out.println(newValue +"valueChangeListener");
int indexSelection = trouverIndexSelection(newValue);
if(indexSelection >= 0){
setTitle(listeEscalesDAO.get(indexSelection).getNomEscale());
}else{
setSelectedOption("*");
setTitle("All");
}
}
the rest of the code is just plain ui elements so i don't think it's relevant to the problem.
To resume, I have tabs.jsp which includes techs.jsp and the valueChangeListener isn't called at all in the latter page's selectOneMenu.
The page is submitted though, as the refresh flash is seen. So i really have no idea to what's goig on here.
I should also add that if i load just the inner page, it works just fine too
Please, could you help ?
Thanks in advance

