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 SV: Problem with tomehawk datatable, selectBooleanCheckbox and sorting
Date Wed, 12 Mar 2008 13:26:17 GMT
I found the solution in this old bug report:
http://issues.apache.org/jira/browse/MYFACES-228

I guess that the default setting for immediate was never changed to
false. It would be nice with some documentation on this "feature".
Should I add some information about it to the wiki pages or what do I do
(Im new to the myfaces community)? 

Im using myfaces 1.1.5 and tomahawk 1.1.6.

regards
Anders

-----Oprindelig meddelelse-----
Fra: Anders H. Andersen [mailto:anders.h.andersen@jyskebank.dk] 
Sendt: 10. marts 2008 10:01
Til: MyFaces Discussion
Emne: SV: Problem with tomehawk datatable, selectBooleanCheckbox and
sorting

Yes I have tried that and I can see that it does behave different.
Without preserveRowStates=true the getters is called in the render
response phase. The setters is never called which means that checkmarks
is cleared. 

I can see from the desciption of preserveRowStates why it should be set
to false when using sorting on a table with input components. It does
not solve my problem completely, so what else can I do to solve it?

regards
Anders


-----Oprindelig meddelelse-----
Fra: simon.kitching@chello.at [mailto:simon.kitching@chello.at]
Sendt: 7. marts 2008 15:55
Til: MyFaces Discussion
Emne: Re: Problem with tomehawk datatable, selectBooleanCheckbox and
sorting

Have you tried this without preserveRowStates?

Anders H. Andersen schrieb:
>
> 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