myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mjovanov <mihajlo.jovano...@jpmchase.com>
Subject Re: Auto Scroll to a Component Receiving the Action - Anchors?
Date Thu, 01 Feb 2007 21:25:32 GMT

I'm using My Faces 1.1.4 and Tomahawk 1.1.5 SNAPSHOT.  I thought about that
too, but I was able to get the autoscroll.jsf example (from
myfaces-example-simple app) to work inside my application so I though that
ruled out that possibility.


Jeff Bischoff wrote:
> 
> Mjovanov,
> 
> I'm not done reading this yet, but one more thing:
> 
> What versions of MyFaces and Tomahawk are you using? Certain 
> combinations break autoscroll.
> 
> mjovanov wrote:
>> Sure, here it is (bare with me, it's a little long):
>> 
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
>>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> 
>> <html 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:c="http://java.sun.com/jstl/core"
>> 	xmlns:acegijsf="http://sourceforge.net/projects/jsf-comp/acegijsf"
>> 	xmlns:t="http://myfaces.apache.org/tomahawk"
>> 	xmlns:a="http://halo.jpmchase.net/jsf">
>> 
>> <ui:composition template="/WEB-INF/layout/layout.xhtml">
>> 	<ui:define name="title">
>> 		#{msg.globalTitle}
>> 	</ui:define>
>> 	<ui:define name="content">
>> 		
>> 		<h:form id="searchResults">
>> 		
>> 			<h:panelGrid columns="1">
>> 				<h:outputText value="#{msg.pageTitleSearchResults}"
>> styleClass="txtContentHeader"/>
>> 			</h:panelGrid>
>> 		
>> 			<table cellspacing="0" cellpadding="0" width="100%">
>> 				<tbody>
>> 					<tr>
>> 						<td><h:commandLink action="searchView" immediate="true">
>> 							<h:outputText value="Return to Search/View page" />
>> 							</h:commandLink>
>> 						</td>
>> 					</tr>
>> 					<!-- Subject No Results Found -->
>> 					<t:htmlTag value="div"  rendered="#{subjects.searched and empty
>> subjects.rows}" >
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No
>> Subject
>> Match Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 					<!-- Case No Results Found -->
>> 					<t:htmlTag value="DIV" rendered="#{cases.searched and empty
>> cases.rows}" >
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No Case
>> Match Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 					<!-- Event No Results Found -->
>> 					<t:htmlTag value="div"  rendered="#{events.searched and empty
>> events.rows}" >
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No Event
>> Match Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 					<!-- Facility No Results Found -->
>> 					<t:htmlTag value="div" rendered="#{facilities.searched and empty
>> facilities.rows}" >
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No
>> Facility
>> Match Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 					<!-- Suspect Account Matches No Results Found -->
>> 					<t:htmlTag value="div"  rendered="#{suspectAccountMatches.searched
>> and
>> empty suspectAccountMatches.rows}" >
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No
>> Suspect
>> Account Match Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 					<!-- SARs No Results Found -->
>> 					<t:htmlTag value="div"  rendered="#{sARs.searched and empty
>> sARs.rows}"
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No SAR
>> Match
>> Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 					<!-- Tranactions No Results Found -->
>> 					<t:htmlTag value="div" rendered="#{transactions.searched and empty
>> transactions.rows}" >
>> 						<TR><t:htmlTag value="TD" styleClass="txtNoSearchResults">No
>> Transaction Match Results Found</t:htmlTag></TR>
>> 					</t:htmlTag>
>> 
>> 
>> 					<!-- Subject header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty subjects.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">Subject Results</th>
>> 							<tr>
>> 								<td>
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{subjects.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="subjectDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right">
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio value="#{subjects.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem itemValue="#{subjects.noPaginationConst}"
>> itemLabel="No pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{subjects.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{subjects.showDataScroller}">
>> 											<a:paginatorMessage dataTable="subjectDetails"
>> messageFormat="short" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{subjects.showDataScroller}">
>> 											<a:paginator dataTable="subjectDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- Subject results -->	
>> 							<tr>
>> 								<td>
>> 									<t:dataTable id="subjectDetails" styleClass="recordSetTable"
>> headerClass="resultSetTableHeader"
>> 									rowClasses="cellDataAltRow,cellDataFirstRow"
>> 									renderedIfEmpty="false" var="row" preserveDataModel="false"
>> 									binding="#{subjects.data}" value="#{subjects.rows}"
>> rows="#{subjects.numOfRowsToDisplay}"
>> 									sortColumn="#{subjects.sortColumn}"
>> 									sortAscending="#{subjects.sortAscending}" preserveSort="true">
>> 									
>> 										<a:column entity="${row}" fieldName="id" label="ID # "
>> backingBean="${subjects}" linkAction="S"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="formattedNames"
>> collection="true" label="Name" backingBean="${subjects}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<t:column id="address">
>> 											<f:facet name="header">
>> 												<t:commandSortHeader columnName="address" arrow="true"
>> 													actionListener="#{subjects.sortChanged}"
>> 													styleClass="cellDataHeader">
>> 													<h:outputText value="Address" />
>> 												</t:commandSortHeader>
>> 											</f:facet>
>> 											<t:dataList id="addressList_datalist" var="address"
>> value="${row.addresses}">
>> 												<h:outputText value="#{address.address1}" rendered="#{not
>> empty
>> address.address1}"/>
>> 												<h:outputText value="#{address.address2}"
>> 													rendered="#{not empty address.address2}">
>> 													<t:htmlTag value="br" />
>> 												</h:outputText>
>> 												<h:outputText value="#{address.city}" rendered="#{not empty
>> address.city}">
>> 													<t:htmlTag value="br" />
>> 												</h:outputText>
>> 												<h:outputText value=", #{address.state} "
>> 													rendered="#{not empty address.state}" />
>> 												<h:outputText value=" #{address.zipCode}"
>> 													rendered="#{not empty address.zipCode}" />
>> 												<t:htmlTag value="br" />								
>> 												<t:htmlTag value="br" rendered="{not empty address}"/>
>> 											</t:dataList>
>> 										</t:column>
>> 										<a:column entity="${row}" fieldName="attributeList"
>> label="Attributes" collection="true" backingBean="${subjects}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="type" label="Type"
>> backingBean="${subjects}" columnStyleClass="resultSetTableCells"/>
>> 											
>> 								</t:dataTable>
>> 								</td>
>> 							</tr>
>> 						</table>	
>> 					</t:htmlTag>
>> 					
>> 					<!-- Case header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty cases.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">Case Results</th>
>> 							<tr>
>> 								<td>
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{cases.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="caseDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right">
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio value="#{cases.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem itemValue="#{cases.noPaginationConst}"
>> itemLabel="No pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{cases.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{cases.showDataScroller}">
>> 											<a:paginatorMessage dataTable="caseDetails"
>> messageFormat="short"
>> />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{cases.showDataScroller}">
>> 											<a:paginator dataTable="caseDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- Case results -->
>> 							<tr>
>> 								<td>
>> 									<t:dataTable id="caseDetails" styleClass="recordSetTable"
>> 										headerClass="resultSetTableHeader"
>> 										rowClasses="cellDataAltRow,cellDataFirstRow"
>> 										renderedIfEmpty="false" var="row" preserveDataModel="false"
>> 										binding="#{cases.data}" value="#{cases.rows}"
>> rows="#{cases.numOfRowsToDisplay}"
>> 										sortColumn="#{cases.sortColumn}"
>> 										sortAscending="#{cases.sortAscending}" preserveSort="true">
>> 										
>> 										<a:column entity="${row}" fieldName="id" label="Case Number"
>> backingBean="${cases}" linkAction="C"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="name" label="Case Name"
>> backingBean="${cases}" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="type"
>> secondaryFieldName="keyword" label="Case Type" backingBean="${cases}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="subType"
>> secondaryFieldName="keyword" label="Case Sub Type" backingBean="${cases}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="workgroup"
>> secondaryFieldName="keyword" label="Workgroup" backingBean="${cases}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="status"
>> secondaryFieldName="keyword" label="Status" backingBean="${cases}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="disposition"
>> secondaryFieldName="keyword" label="Disposition" backingBean="${cases}"
>> columnStyleClass="resultSetTableCells"/>
>> 											
>> 									</t:dataTable>
>> 								</td>
>> 							</tr>
>> 						</table>
>> 					</t:htmlTag>					
>> 
>> 					<!-- Event header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty events.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">
>> 							<h:outputText value="Event Results"
>> rendered="#{events.generalEvents}"/>
>> 							<h:outputText value="IFS/CIP Event Results"
>> rendered="#{events.onlyIFSCIP}"/>
>> 							</th>
>> 							<tr>
>> 								<td>
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{events.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="eventDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right">
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio value="#{events.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem itemValue="#{events.noPaginationConst}"
>> itemLabel="No pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{events.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{events.showDataScroller}">
>> 											<a:paginatorMessage dataTable="eventDetails"
>> messageFormat="short" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{events.showDataScroller}">
>> 											<a:paginator dataTable="eventDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- Event results -->
>> 							<tr>
>> 								<td>
>> 
>> 									<t:dataTable id="eventDetails" styleClass="recordSetTable"
>> 										headerClass="resultSetTableHeader"
>> 										rowClasses="cellDataAltRow,cellDataFirstRow"
>> 										renderedIfEmpty="false" var="row" preserveDataModel="false"
>> 										binding="#{events.data}" value="#{events.rows}"
>> rows="#{events.numOfRowsToDisplay}"
>> 										sortColumn="#{events.sortColumn}"
>> 										sortAscending="#{events.sortAscending}" preserveSort="true" >
>> 											<!-- Common columns -->
>> 											<a:column entity="${row}" fieldName="id" label="Event Number"
>> backingBean="${events}" linkAction="E"
>> columnStyleClass="resultSetTableCells" />
>> 											<!-- Mixed or General columns -->
>> 											<a:column entity="${row}" fieldName="type" label="Event Type"
>> secondaryFieldName="keyword" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="#{events.generalEvents}"/>
>> 											<a:column entity="${row}" fieldName="subType" label="Event
>> SubType" secondaryFieldName="keyword" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="#{events.generalEvents}"/>
>> 											<a:column entity="${row}" fieldName="date" label="Event Date"
>> backingBean="${events}" dateFormat="short" datePattern="MM/dd/yyyy"
>> columnStyleClass="resultSetTableCells"
>> renderValue="#{events.generalEvents}"/>
>> 											<a:column entity="${row}" fieldName="name" label="Name"
>> backingBean="${events}" columnStyleClass="resultSetTableCells"
>> renderValue="#{events.generalEvents}"/>
>> 											<a:column entity="${row}" fieldName="status" label="Status"
>> secondaryFieldName="keyword" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="#{events.generalEvents}"/>
>> 											<a:column entity="${row}" fieldName="disposition"
>> secondaryFieldName="keyword" label="Disposition" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="#{events.generalEvents}"/>
>> 											<!-- IFS/CIP only columns -->
>> 											<a:column entity="${row}" fieldName="workgroup"
>> secondaryFieldName="keyword" label="Workgroup" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="${events.onlyIFSCIP}"/>
>> 											<a:column entity="${row}" fieldName="cipInvestigatorName"
>> label="CIP Investigator Name" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="${events.onlyIFSCIP}"/>
>> 											<a:column entity="${row}" fieldName="SSN" label="Customer
>> SSN/TIN" backingBean="${events}" columnStyleClass="resultSetTableCells"
>> renderValue="${events.onlyIFSCIP}"/>
>> 											<!-- CIP only columns -->
>> 											<t:column id="alertAge" rendered="${events.onlyIFSCIP}">
>> 												<f:facet name="header">
>> 													<t:commandSortHeader columnName="alertAge" arrow="true"
>> 														actionListener="#{events.sortChanged}"
>> 														styleClass="cellDataHeader">
>> 														<h:outputText value="Greatest Alert Age" />
>> 													</t:commandSortHeader>
>> 												</f:facet>
>> 													<h:outputText value="#{row.alertAge}"
>> 														rendered="#{not empty row.alertAge and not row.alertAgeNA
>> and
>> not row.alertAgeClosed}" />
>> 													<h:outputText value="N/A"
>> 														rendered="#{row.alertAgeNA}" />
>> 													<h:outputText value="Closed"
>> 														rendered="#{row.alertAgeClosed}" />
>> 
>> 											</t:column>
>> 
>> 											<!-- IFS only columns -->
>> 											<t:column id="eventAge" rendered="${events.onlyIFSCIP}">
>> 												<f:facet name="header">
>> 													<t:commandSortHeader columnName="eventAge" arrow="true"
>> 														actionListener="#{events.sortChanged}"
>> 														styleClass="cellDataHeader">
>> 														<h:outputText value="Event Age" />
>> 													</t:commandSortHeader>
>> 												</f:facet>
>> 													<h:outputText value="#{row.eventAge}"
>> 														rendered="#{not empty row.eventAge and  not row.eventAgeNA
>> and
>> not row.eventAgeClosed}" />
>> 													<h:outputText value="N/A"
>> 														rendered="#{row.eventAgeNA}" />
>> 													<h:outputText value="Closed"
>> 														rendered="#{row.eventAgeClosed}" />
>> 											</t:column>
>> 											<!-- IFS/CIP only columns -->
>> 																			
>> 											<a:column entity="${row}" fieldName="applicationClassCode" 
>> label="Application Class Code" backingBean="${events}"
>> columnStyleClass="resultSetTableCells"
>> renderValue="#{events.onlyIFSCIP}"/>
>> 											<a:column entity="${row}" fieldName="bankNumber"  label="Bank
>> Number" backingBean="${events}" columnStyleClass="resultSetTableCells"
>> renderValue="#{events.onlyIFSCIP}"/>
>> 											<a:column entity="${row}" fieldName="lob1"  label="LOB1"
>> backingBean="${events}" columnStyleClass="resultSetTableCells"
>> renderValue="#{events.onlyIFSCIP}"/>
>> 											<a:column entity="${row}" fieldName="lob2"  label="LOB2"
>> backingBean="${events}" columnStyleClass="resultSetTableCells"
>> renderValue="#{events.onlyIFSCIP}"/>
>> 											<a:column entity="${row}" fieldName="eciNumber"  label="ECI
>> Number" backingBean="${events}" columnStyleClass="resultSetTableCells"
>> renderValue="#{events.onlyIFSCIP}"/>
>> 
>> 									</t:dataTable>
>> 
>> 								</td>
>> 							</tr>
>> 						</table>
>> 					</t:htmlTag>
>> 					<!-- Facility header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty facilities.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">Facility Results</th>
>> 							<tr>
>> 								<td>
>> 								
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{facilities.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="facilityDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right" >
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio value="#{facilities.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem itemValue="#{facilities.noPaginationConst}"
>> itemLabel="No pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{facilities.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{facilities.showDataScroller}">
>> 											<a:paginatorMessage dataTable="facilityDetails"
>> messageFormat="short" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{facilities.showDataScroller}">
>> 											<a:paginator dataTable="facilityDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- Facility results -->
>> 							<tr>
>> 								<td>
>> 									<t:dataTable id="facilityDetails" styleClass="recordSetTable"
>> 										headerClass="resultSetTableHeader"
>> 										rowClasses="cellDataAltRow,cellDataFirstRow"
>> 										renderedIfEmpty="false" var="row" preserveDataModel="false"
>> 										binding="#{facilities.data}" value="#{facilities.rows}"
>> rows="#{facilities.numOfRowsToDisplay}"
>> 										sortColumn="#{facilities.sortColumn}"
>> 										sortAscending="#{facilities.sortAscending}"
>> preserveSort="true">
>> 										
>> 										<a:column entity="${row}" fieldName="id" label="Facility ID"
>> backingBean="${facilities}" linkAction="F"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="name" label="Facility
>> Name"
>> backingBean="${facilities}" columnStyleClass="resultSetTableCells"/>
>> 										<t:column id="address1">
>> 											<f:facet name="header">
>> 												<t:commandSortHeader columnName="address" arrow="true"
>> 													actionListener="#{facilities.sortChanged}"
>> 													styleClass="cellDataHeader">
>> 													<h:outputText value="Address" />
>> 												</t:commandSortHeader>
>> 											</f:facet>
>> 											<h:outputText value="#{row.address}" rendered="#{not empty
>> row.address}" />
>> 											<h:outputText value="#{row.city}" rendered="#{not empty
>> row.city}">
>> 												<t:htmlTag value="br" />
>> 											</h:outputText>
>> 											<h:outputText value=", #{row.state} "
>> 												rendered="#{not empty row.state}" />
>> 											<h:outputText value=" #{row.zip}"
>> 												rendered="#{not empty row.zip}" />
>> 										</t:column>
>> 										<a:column entity="${row}" fieldName="country"  label="Country"
>> backingBean="${facilities}" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="status" label="Status"
>> backingBean="${facilities}" columnStyleClass="resultSetTableCells"/>
>> 											
>> 									</t:dataTable>
>> 								</td>
>> 							</tr>
>> 						</table>
>> 					</t:htmlTag>
>> 
>> 					<!-- Suspect Account Match header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty suspectAccountMatches.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">Suspect Account Match Results</th>
>> 							<tr>
>> 								<td>
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{suspectAccountMatches.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="suspectAccountMatchDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right">
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio
>> value="#{suspectAccountMatches.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem
>> itemValue="#{suspectAccountMatches.noPaginationConst}" itemLabel="No
>> pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{suspectAccountMatches.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{suspectAccountMatches.showDataScroller}">
>> 											<a:paginatorMessage dataTable="suspectAccountMatchDetails"
>> messageFormat="short" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{suspectAccountMatches.showDataScroller}">
>> 											<a:paginator dataTable="suspectAccountMatchDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- Suspect Account Match results -->
>> 							<tr>
>> 								<td>
>> 									<t:dataTable id="suspectAccountMatchDetails"
>> 										styleClass="recordSetTable" headerClass="resultSetTableHeader"
>> 										rowClasses="cellDataAltRow,cellDataFirstRow"
>> 										renderedIfEmpty="false" var="row" preserveDataModel="false"
>> 										binding="#{suspectAccountMatches.data}"
>> 										value="#{suspectAccountMatches.rows}"
>> rows="#{suspectAccountMatches.numOfRowsToDisplay}"
>> 										sortColumn="#{suspectAccountMatches.sortColumn}"
>> 										sortAscending="#{suspectAccountMatches.sortAscending}"
>> 										preserveSort="true">
>> 										
>> 										<a:column entity="${row}" fieldName="eventNumber" label="Event
>> Number" backingBean="${suspectAccountMatches}" linkAction="E"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="subjectName"
>> label="Subject
>> Name" backingBean="${suspectAccountMatches}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="customerPrimaryNameList"
>> label="Primary Name" collection="true"
>> backingBean="${suspectAccountMatches}"
>> columnStyleClass="resultSetTableCells"/>						
>> 										<a:column entity="${row}" fieldName="individualDimKey"
>> label="DIM"
>> backingBean="${suspectAccountMatches}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="customerSsnTinList"
>> label="SSN/TIN" collection="true" backingBean="${suspectAccountMatches}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="customerDobList"
>> label="DOB"
>> collection="true" backingBean="${suspectAccountMatches}"
>> dateFormat="short"
>> datePattern="MM/dd/yyyy" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="matchType" label="Match
>> Type"
>> backingBean="${suspectAccountMatches}" secondaryFieldName="keyword"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="matchScore" label="Match
>> Score" backingBean="${suspectAccountMatches}" 
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="matchStatus" label="Match
>> Status" backingBean="${suspectAccountMatches}"
>> secondaryFieldName="keyword"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="matchDate" label="Match
>> Date"
>> backingBean="${suspectAccountMatches}" dateFormat="short"
>> datePattern="MM/dd/yyyy" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="lineOfBusiness"
>> label="LOB"
>> backingBean="${suspectAccountMatches}" secondaryFieldName="keyword"
>> columnStyleClass="resultSetTableCells"/>
>> 										
>> 											
>> 									</t:dataTable>
>> 								</td>
>> 							</tr>
>> 						</table>
>> 					</t:htmlTag>
>> 					
>> 					<!-- SAR header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty sARs.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">SAR Results</th>
>> 							<tr>
>> 								<td>
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{sARs.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="sARDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right">
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio value="#{sARs.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem itemValue="#{sARs.noPaginationConst}"
>> itemLabel="No pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{sARs.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{sARs.showDataScroller}">
>> 											<a:paginatorMessage dataTable="sARDetails"
>> messageFormat="short"
>> />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{sARs.showDataScroller}">
>> 											<a:paginator dataTable="sARDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- SAR results -->
>> 							<tr>
>> 								<td>
>> 									<t:dataTable id="sARDetails" styleClass="recordSetTable"
>> 										headerClass="resultSetTableHeader"
>> 										rowClasses="cellDataAltRow,cellDataFirstRow"
>> 										renderedIfEmpty="false" var="row" preserveDataModel="false"
>> 										binding="#{sARs.data}" value="#{sARs.rows}"
>> rows="#{sARs.numOfRowsToDisplay}"
>> 										sortColumn="#{sARs.sortColumn}"
>> 										sortAscending="#{sARs.sortAscending}" preserveSort="true">
>> 										
>> 										<a:column entity="${row}" fieldName="caseNumber" label="Case
>> Number" backingBean="${sARs}" linkAction="C"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="caseName" label="Case
>> Name"
>> backingBean="${sARs}" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="status" label="Status"
>> secondaryFieldName="keyword" backingBean="${sARs}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="filedDate" label="Date
>> Filed"
>> backingBean="${sARs}" dateFormat="short" datePattern="MM/dd/yyyy"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="dueDate" label="Due Date"
>> backingBean="${sARs}" dateFormat="short" datePattern="MM/dd/yyyy"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="lob" label="LOB"
>> secondaryFieldName="keyword" backingBean="${sARs}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="facilityName"
>> label="Facility" backingBean="${sARs}"
>> columnStyleClass="resultSetTableCells"/>
>> 											
>> 									</t:dataTable>
>> 								</td>
>> 							</tr>
>> 						</table>
>> 					</t:htmlTag>
>> 
>> 					<!-- Transaction header -->
>> 					<t:htmlTag value="div" styleClass="tablePagingControls"
>> rendered="#{not
>> empty transactions.rows}" >
>> 						<table border="1" cellspacing="0" cellpadding="0" width="100%">
>> 							<th align="center">Transaction Results</th>
>> 							<tr>
>> 								<td>
>> 								<h:panelGrid columns="2" cellspacing="0" cellpadding="0"
>> width="100%">
>> 									<h:panelGrid columns="1" >
>> 										<t:htmlTag value="br" />
>> 										<t:htmlTag value="br" />
>> 										<h:panelGrid align="left">
>> 											<h:commandLink action="#{transactions.exportToExcel}"
>> class="linkCaption">
>> 												<t:graphicImage url="images/icon_excel.gif"
>> alt="#{msg.labelExportSearchResultsToExcel}" width="21"
>> 												height="16" />
>> 												<h:outputText value="#{msg.labelExportSearchResultsToExcel}"
>> />
>> 											</h:commandLink>
>> 										</h:panelGrid>
>> 										<h:panelGrid align="left">
>> 											<a:paginatorMessage dataTable="transactionDetails" />
>> 										</h:panelGrid>
>> 	
>> 									</h:panelGrid>
>> 
>> 									<h:panelGrid columns="1" cellspacing="0" cellpadding="0"
>> align="right">
>> 										<h:panelGrid columns="2"  align="right">
>> 											<h:selectOneRadio value="#{transactions.resultsPerPage}">
>> 													<f:selectItem itemValue="25" itemLabel="25" />
>> 													<f:selectItem itemValue="50" itemLabel="50" />
>> 													<f:selectItem itemValue="100" itemLabel="100" />
>> 													<f:selectItem itemValue="#{transactions.noPaginationConst}"
>> itemLabel="No pagination" />
>> 											</h:selectOneRadio>
>> 											<h:commandButton value="Apply"
>> action="#{transactions.resultsPerPageChanged}" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{transactionss.showDataScroller}">
>> 											<a:paginatorMessage dataTable="transactionDetails"
>> messageFormat="short" />
>> 										</h:panelGrid>
>> 										<h:panelGrid columns="2" align="right"
>> rendered="#{transactions.showDataScroller}">
>> 											<a:paginator dataTable="transactionDetails" />
>> 										</h:panelGrid>
>> 									</h:panelGrid>
>> 								</h:panelGrid>
>> 								</td>
>> 							</tr>
>> 							<!-- Transaction results -->
>> 							<tr>
>> 								<td>
>> 									<t:dataTable
>> 										id="transactionDetails"
>> 										styleClass="recordSetTable"
>> 										headerClass="resultSetTableHeader"
>> 										rowClasses="cellDataAltRow,cellDataFirstRow"
>> 										renderedIfEmpty="false"
>> 										var="row"
>> 										preserveDataModel="false"
>> 										binding="#{transactions.data}"
>> 										value="#{transactions.rows}"
>> 										rows="#{transactions.numOfRowsToDisplay}"
>> 										sortColumn="#{transactions.sortColumn}"
>> 										sortAscending="#{transactions.sortAscending}"
>> 										preserveSort="true">
>> 										
>> 										<a:column entity="${row}" fieldName="caseNumber" label="Case
>> Number" backingBean="${transactions}" linkAction="C"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="id" label="Transaction Id"
>> backingBean="${transactions}" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="subjectName"
>> label="Subject
>> Name" backingBean="${transactions}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="adjustmentAmount"
>> label="Adjustment Amount" backingBean="${transactions}"
>> currencyPattern="'$'#,##0.00;(#,##0.00)"
>> columnStyleClass="resultSetTableCellsAlignRight"/>
>> 										<a:column entity="${row}" fieldName="adjustmentType"
>> secondaryFieldName="keyword" label="Adjustment Type"
>> backingBean="${transactions}" columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="transactionDate"
>> label="Transaction Date" backingBean="${transactions}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="generalLedger"
>> label="General
>> Ledger" backingBean="${transactions}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="costCenter" label="Cost
>> Center" backingBean="${transactions}"
>> columnStyleClass="resultSetTableCells"/>
>> 										<a:column entity="${row}" fieldName="source"
>> secondaryFieldName="keyword" label="Source" backingBean="${transactions}"
>> columnStyleClass="resultSetTableCells"/>
>> 										
>> 									</t:dataTable>
>> 								</td>
>> 							</tr>
>> 						</table>
>> 					</t:htmlTag>
>> 
>> 				</tbody>
>> 			</table>
>> 		</h:form>
>> 	</ui:define>
>> </ui:composition>
>> </html>
>> 
>> 
>> 
>> 
>> Jeff Bischoff wrote:
>>> Can you show us page code?
>>>
>>> mjovanov wrote:
>>>> Thanks for the tip Jeff, I did set AUTO_SCROLL to true but
>>>> unfortunately
>>>> it
>>>> still doesn't work; it works for a simple examples with hrefs but not
>>>> in
>>>> my
>>>> case with multiple data tables and sorting.
>>>>
>>>> No error message either; any clues?
>>>>
>>>>
>>>> Jeff Bischoff wrote:
>>>>> This is a MyFaces feature called AUTO_SCROLL. You can set it in your
>>>>> web.xml
>>>>>
>>>>> <context-param>
>>>>>    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>>>>>    <param-value>true</param-value>
>>>>> </context-param>
>>>>>
>>>>> mjovanov wrote:
>>>>>> Hi, we have several Data Table components stacked on the same page;
>>>>>> if
>>>>>> a
>>>>>> user
>>>>>> scrolls down to view one of the Data Tables towards the bottom of
the
>>>>>> page
>>>>>> and then clicks on its column to perform a sort, the page is
>>>>>> refreshed
>>>>>> and
>>>>>> he/she is taken back to the top of the page.  I was just wondering
if
>>>>>> there
>>>>>> is a way to automatically scroll to a component on the page on which
>>>>>> the
>>>>>> sort was performed (perhaps using anchors)?
>>>>>
>>>>>
>>>
>>>
>>>
>> http://www.nabble.com/file/6191/searchResults.xhtml searchResults.xhtml 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Auto-Scroll-to-a-Component-Receiving-the-Action---Anchors--tf3155274.html#a8756754
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message