myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anders H. Andersen" <anders.h.ander...@jyskebank.dk>
Subject Problem with tomehawk datatable, selectBooleanCheckbox and sorting
Date Fri, 07 Mar 2008 14:11:38 GMT
The problem is that the checked boxes does not move when the sorting is
changed.

I can see from the log that the set and get metodes ond checkbox isnt's
called when the sorting is changed, so that explains why the marks on
the checkbox does not follow the sorting. How can I make the datatable
call the setter and getters on the checkbox?

The code look like these:

<t:dataTable id="payments"
		value="#{paymentBB.uiPayments}" var="paymentUI"
		rendered="#{paymentBB.showPayments}"
		sortable="false" 
		preserveRowStates="true"
		rows="#{paymentBB.noOfRowsPrPage}"

		rowIndexVar="rowIndex"
		first="#{paymentBB.rowIndex}"

		styleClass="TableStandard"
columnClasses=",FixedBSKreditorColumWidth Label,Amount,Label,Label"
rowClasses="Even, Odd"  >
		<t:column sortable="false" >
			<f:facet name="header">
				<h:outputText
value="#{text['text.afvis']}" />

			</f:facet>
			<t:selectBooleanCheckbox
value="#{paymentUI.checked}"/>
		</t:column>
		<t:column sortable="true">
			<f:facet name="header">
				<t:commandSortHeader
columnName="modtager" arrow="false">

					<f:facet name="ascending">
						<t:graphicImage
url="/images/listesortop.gif" border="0" alt=""/>
					</f:facet>
					<f:facet name="descending">
						<t:graphicImage
url="/images/listesortned.gif" border="0" alt=""/>
					</f:facet>
					<h:outputText id="txtModtager"
style="text-align:left;"
	
title="#{text['text.tabelTitle']}"
	
value="#{text['text.modtager']}" />
				</t:commandSortHeader>
			</f:facet>
			<h:outputText
value="#{paymentUI.payment.modtager}" />
		</t:column>
		<t:column sortable="true" styleClass="Amount">
			<f:facet name="header">
				<t:commandSortHeader
styleClass="RightSpan" arrow="false" columnName="beloeb"
title="#{text['text.tabelTitle']}">
					<f:facet name="ascending">
						<t:graphicImage
url="/images/listesortop.gif" border="0" alt=""/>
					</f:facet>
					<f:facet name="descending">
						<t:graphicImage
url="/images/listesortned.gif" border="0" alt=""/>
					</f:facet>

					<h:outputText
value="#{text['text.beloeb']}" />
				</t:commandSortHeader>
			</f:facet>
			<h:outputText
value="#{paymentUI.payment.beloeb}">
				<f:convertNumber maxFractionDigits="2"
minFractionDigits="2"  />
			</h:outputText>
		</t:column>
		<t:column sortable="true">
			<f:facet name="header" >
				<t:commandSortHeader arrow="false"
columnName="dato" title="#{text['text.tabelTitle']}">
					<f:facet name="ascending" >
						<t:graphicImage
url="/images/listesortop.gif" border="0" alt="" />
					</f:facet>
					<f:facet name="descending">
						<t:graphicImage
url="/images/listesortned.gif" border="0" alt="" />
					</f:facet>

					<h:outputText 
	
title="#{text['text.tabelTitle']}"
	
value="#{text['text.dato']}" />
				</t:commandSortHeader>
			</f:facet>
			<h:outputText
value="#{paymentUI.payment.betalingsdato}">
				<ebf:dateConverter
pattern="#{formatBB.datoFormat}" />
			</h:outputText>
		</t:column>

		<t:column defaultSorted="true" sortable="true" >
			<f:facet name="header">
				<t:commandSortHeader columnName="konto"
arrow="false">

					<f:facet name="ascending">
						<t:graphicImage
url="/images/listesortop.gif" border="0" alt="" />
					</f:facet>
					<f:facet name="descending">
						<t:graphicImage
url="/images/listesortned.gif" border="0" alt="" styleClass=""/>
					</f:facet>

					<h:outputText
	
title="#{text['text.tabelTitle']}"
	
value="#{text['text.konto']}" />

				</t:commandSortHeader>
			</f:facet>
			<h:outputText value="#{paymentUI.payment.regNr}"
/><f:verbatim>&nbsp;</f:verbatim>
			<h:outputText
value="#{paymentUI.payment.kontoNr}">
				<jbsf:kontoConverter />
			</h:outputText>
			<f:verbatim>&nbsp;</f:verbatim>
			<h:outputText
value="#{paymentUI.payment.kontoNavn}" />
			<f:verbatim>&nbsp;</f:verbatim>
			<h:outputText
value="#{paymentUI.skyggeSaldoTekst}" /><t:htmlTag value="br"/>

			<h:outputText
value="#{paymentUI.payment.kontoEjer}" /><t:htmlTag value="br"/>
			<h:outputText
value="#{paymentUI.payment.kontoMedejer}" />
		</t:column>
	</t:dataTable>

regards
Anders

Mime
View raw message