problème avec <t:dataScroller>
Bonjour,
J'ai une page où je dois afficher à droite ma liste de contact et à gauche le détail du contact s'affiche quand je clique sur ce dernier.
Le problème est que quand je sélectionne un contact dans la deuxième page de ma dataTable, le détail du contact s'affiche bien mais le dataScroller revient sur la première page.
Voici mon code et merci d'avance :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
| <t:dataTable id="suiviAppelTable" var="suiviAppelRow"
width="100%" value="#{contactClientBean.contactClientList}"
styleClass="table_s" headerClass="th_s"
rowClasses="td1_s, td2_s" preserveDataModel="false" rows="9"
rowOnClick="this.style.backgroundColor='#A5CBFF'"
preserveSort="true" sortColumn="#{contactClientBean.sort}"
sortAscending="#{contactClientBean.ascending}"
renderedIfEmpty="false">
<t:column styleClass="column_s" width="200">
<f:facet name="header">
<h:panelGrid columns="1" cellpadding="0" cellspacing="0" border="0">
<h:panelGrid columns="2" cellpadding="1" cellspacing="0" border="0">
<t:commandSortHeader styleClass="commandSort"
value="#{contactClientMsg.prenom}" columnName="prenom"
arrow="true" />
<t:commandSortHeader styleClass="commandSort"
value="#{contactClientMsg.nom}" columnName="nom" arrow="true" />
</h:panelGrid>
<h:panelGrid columns="2" cellpadding="1" cellspacing="0" border="0">
<t:graphicImage value="/images/spacer.gif" width="133px" height="0px"/>
<t:commandSortHeader styleClass="commandSort"
value="#{contactClientMsg.client}"
columnName="client.clientNom" arrow="true" />
</h:panelGrid>
</h:panelGrid>
</f:facet>
<h:panelGrid columns="2" cellpadding="1" cellspacing="0" border="0" style="white-space: nowrap;" width="100%">
<h:commandLink action="contactClient">
<t:updateActionListener
property="#{visitHelpDesk.ongletContactClient}" value="0" />
<t:updateActionListener
property="#{contactClientBean.contactClientId}"
value="#{suiviAppelRow.contactClientId}" />
<t:updateActionListener
property="#{commentaireBean.parentObjectId}"
value="#{suiviAppelRow.contactClientId}" />
<t:updateActionListener
property="#{commentaireBean.parentObjectType}"
value="contact_client" />
<t:updateActionListener
property="#{pieceJointeBean.parentObjectId}"
value="#{suiviAppelRow.contactClientId}" />
<t:updateActionListener
property="#{pieceJointeBean.parentObjectType}"
value="contact_client" />
<t:updateActionListener property="#{clientBean.clientId}"
value="#{suiviAppelRow.clientId}" />
<t:updateActionListener
property="#{consigneBean.parentObjectId}"
value="#{suiviAppelRow.clientId}" />
<t:updateActionListener
property="#{consigneBean.parentObjectType}" value="client" />
<t:updateActionListener
property="#{contactClientBean.clientId}"
value="#{contactClientBean.contactClient.clientId}" />
<t:updateActionListener
property="#{visitHelpDesk.saveProspectFromContactClient}"
value="true" />
<t:updateActionListener property="#{visitHelpDesk.renderedEditProspect}" value="true"/>
<t:updateActionListener property="#{lotTable.clientId}"
value="#{suiviAppelRow.clientId}" />
<t:updateActionListener property="#{visitHelpDesk.renderedDeleteContact}"
value="true" />
<t:updateActionListener property="#{visitHelpDesk.disabledNomPrenom}"
value="false" />
<t:updateActionListener property="#{visitHelpDesk.renderedSaveChangingProspectToList}"
value="false" />
<t:updateActionListener property="#{visitHelpDesk.renderedSaveChangingProspectToSuivi}"
value="false" />
<t:updateActionListener property="#{visitHelpDesk.renderedSaveContact}"
value="true" />
<h:panelGroup>
<h:outputText value="#{suiviAppelRow.prenom}" />
<h:outputText value=" " />
<h:outputText value="#{suiviAppelRow.nom}" />
</h:panelGroup>
</h:commandLink>
</h:panelGrid>
</t:column>
<t:column styleClass="column_s">
<f:facet name="header">
<t:commandSortHeader styleClass="commandSort"
value="Notes"
columnName="prochaineAction" arrow="true" />
</f:facet>
<h:outputText value="#{suiviAppelRow.note}" escape="false" />
</t:column>
</t:dataTable>
<h:panelGrid columns="2" styleClass="structure">
<rich:datascroller align="left" for="suiviAppelTable" maxPages="5"
id="scroll_4_ContactProspectList" tableStyleClass="rich-datascr-button" styleClass="rich-datascr-button"
selectedStyleClass="rich-datascr-button" renderIfSinglePage="false">
<f:facet name="first">
<t:graphicImage url="/images/resultset_first.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="first_disabled">
<t:graphicImage url="/images/resultset_first.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="last">
<t:graphicImage url="/images/resultset_last.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="last_disabled">
<t:graphicImage url="/images/resultset_last.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="previous">
<t:graphicImage url="/images/resultset_previous.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="previous_disabled">
<t:graphicImage url="/images/resultset_previous.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="next">
<t:graphicImage url="/images/resultset_next.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="next_disabled">
<t:graphicImage url="/images/resultset_next.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="fastforward">
<t:graphicImage url="/images/resultset_next_double.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="fastforward_disabled">
<t:graphicImage url="/images/resultset_next_double.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="fastrewind">
<t:graphicImage url="/images/resultset_previous_double.gif" border="0" height="13" width="13"/>
</f:facet>
<f:facet name="fastrewind_disabled">
<t:graphicImage url="/images/resultset_previous_double.gif" border="0" height="13" width="13"/>
</f:facet>
</rich:datascroller>
<t:dataScroller id="scroll_2_EquipeList" for="suiviAppelTable"
pageCountVar="pageCount" pageIndexVar="pageIndex"
rowsCountVar="rowsCount"
displayedRowsCountVar="displayedRowsCountVar"
firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex"
immediate="true">
<h:outputFormat
value="#{contactClientMsg.contactClientDataScroller1}"
styleClass="log">
<f:param value="#{rowsCount}" />
<f:param value="#{displayedRowsCountVar}" />
<f:param value="#{firstRowIndex}" />
<f:param value="#{lastRowIndex}" />
<f:param value="#{pageIndex}" />
<f:param value="#{pageCount}" />
</h:outputFormat>
</t:dataScroller>
</h:panelGrid> |