ExtendedDataTable Selection Issue
david-brighton Aug 20, 2013 8:18 AMf I look at the
I am using JSF 2 and Richfaces 3.3.3
The issue is that when I make a selection in the table this is not being set in the backing bean, the backing bean is defines as request scope ie.
<managed-bean>
<managed-bean-name>customerBean</managed-bean-name>
<managed-bean-class>beans.CustomerBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<r:simpleTogglePanel switchType="client" opened="true" > |
<f:facet name="header" >
<h:outputText value="Customer Search Results" styleClass="default-header" />
</f:facet>
<a:outputPanel id="customerSearchResultsPanel" > |
<r:extendedDataTable id="customerTable"height="200px"
value="#{customerBean.customerDataModel}"
var="customer"
selectionMode="single"
selection="#{customerBean.customerSearchSelection}">
<r:column sortBy="#{customer.internalRef}" sortable="true" width="20%">
<f:facet name="header">
<h:outputText value="Internal Reference" />
</f:facet>
<h:outputText value="#{customer.internalRef}" />
</r:column>
<r:column sortBy="#{customer.shortName}" filterBy="#{customer.shortName}" sortable="true" width="40%" >
<f:facet name="header">
<h:outputText value="Customer Name" />
</f:facet>
<h:outputText value="#{customer.shortName}" />
</r:column>
<r:column sortBy="#{customer.controllingTeamDescription}" sortable="true" width="40%" >
<f:facet name="header">
<h:outputText value="Controlling Team" />
</f:facet>
<h:outputText value="#{customer.controllingTeamDescription}" />
</r:column>
<a:support event="onselectionchange"
reRender="customerDetailPanel"
action="#{customerBean.identifySelectedCustomer}" />
</r:extendedDataTable>
</a:outputPanel>
</r:simpleTogglePanel>
If I look at the customerSearchSelection variable in the backing bean customerBean when the action is triggered it has a size of 0.
Any help would be much appreciated
-
jsp_snippet.doc 26.0 KB
-
bean_snippet.doc 19.5 KB