This is a related (and or follow up) issue to :
Event Function called before Setter
So Given i have :
<Td>
<h:selectOneMenu id="combocarList"
value="#{customerBean.selectedcar}"
styleClass="comboStyle"
valueChangeListener="#{customerBean.loadothercombos}"
onchange="document.forms[0].submit()"
>
<f:selectItem
itemLabel="-----------Select--------------"
itemValue="None" />
<f:selectItems value="#{customerBean.carsList}" />
</h:selectOneMenu>
</Td>
the event is called when user selects an item from dropdown list and the backbean does the processing to retrieve values of other dropdown list which works ok , BUT i also have a h:datatable which is the problem. The values won't show.
the datatable is defined as:
<h:dataTable
id="calDetails" rowClasses="oddrow,evenrow"
headerClass="thHeading" var="car"
value="#{cardetails.allinfo}">
<h:column>
<f:facet name="header">
<h:outputText id="lblCode" value="Code"></h:outputText>
</f:facet>
<h:inputHidden value="#{car.code}"></h:inputHidden>
<h:outputText id="carcodeid"
value="#{car.code}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText id="lblCode" value="Sold"></h:outputText>
</f:facet>
<h:inputHidden value="#{car.sales}"></h:inputHidden>
<h:outputText id="carsalesid"
value="#{car.sales}"></h:outputText>
</h:column>
</h:dataTable>
i have setter and getters for cardetails.allinfo
and i know when document.forms[0].submit()
is called cardetails.allinfo
is not null since as i tested it using
<h:outputText value="#{cardetails.allinfo eq null}" />
which returned false. I've been starring at it for hours and can't see my fault. would appreciate any input. Thanks