<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:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:form>
<a4j:outputPanel id="table">
<table border="1" class="dr-table rich-table">
<thead class="dr-table-thead">
<tr class="dr-table-header rich-table-header">
<th class="dr-table-headercell rich-table-headercell"><h:outputText value="Product Code" /></th>
<th class="dr-table-headercell rich-table-headercell"><h:outputText value="Proposed Price" /></th>
<th class="dr-table-headercell rich-table-headercell"><h:outputText value="Sales Cost" /></th>
<th class="dr-table-headercell rich-table-headercell" style="width: 150px"><h:outputText value="Reason" /></th>
<th class="dr-table-headercell rich-table-headercell"><h:outputText value="Proposed Gross Margin" /></th>
</tr>
</thead>
<tbody>
<a4j:repeat value="#{salesReport.items}" var="item" binding="#{updateBean.repeater}">
<tr>
<td align="center" class="dr-subtable-cell rich-subtable-cell">
<h:outputText value="#{item.productCode}" />
</td>
<td class="dr-subtable-cell rich-subtable-cell">
<h:inputText binding="#{updateBean.priceRef}"
immediate="false" value="#{item.proposedPrice}" size="7">
<a4j:support immediate="true" action="#{updateBean.change}"
event="onchange" reRender="reason,margin" />
</h:inputText>
</td>
<td class="dr-subtable-cell rich-subtable-cell">
<h:outputText value="#{item.salesCost}" />
</td>
<td class="dr-subtable-cell rich-subtable-cell">
<h:selectOneMenu id="reason" required="true"
value="#{item.reason}">
<f:selectItems value="#{item.reasons}" />
</h:selectOneMenu>
</td>
<td class="dr-subtable-cell rich-subtable-cell">
<h:outputText id="margin"
value="#{item.proposedGrossMargin}">
<f:convertNumber pattern="$###0.000" />
</h:outputText>
</td>
</tr>
</a4j:repeat>
</tbody>
</table>
</a4j:outputPanel>
<rich:messages />
</h:form>
</ui:composition>
<<Hide Source