[richfaces-issues] [JBoss JIRA] (RF-13450) page attribute on dataScroller doesn't work with a request scope

Luca Stancapiano (JIRA) issues at jboss.org
Thu Dec 26 13:19:32 EST 2013


Luca Stancapiano created RF-13450:
-------------------------------------

             Summary: page attribute on dataScroller doesn't work with a request scope
                 Key: RF-13450
                 URL: https://issues.jboss.org/browse/RF-13450
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-ScrollableDataTable
    Affects Versions: 4.3.4
         Environment: java 6 on jboss as 7.1
            Reporter: Luca Stancapiano
         Attachments: scrollablesample.zip

Here the dataTable with a dataScroller:

			<rich:dataScroller for="table" maxPages="5"
				page="#{currentPage.page}" />
			<rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
				id="table" rows="10">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="Vendor " />
					</f:facet>
					<h:outputText value="#{car.vendor}" />
				</rich:column>
                                ...
                          </rich:dataTable>

Here the definition of the currentPage bean:

    <managed-bean>
        <managed-bean-name>currentPage</managed-bean-name>
        <managed-bean-class>prova.CurrentPage</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>

Here the currentPage bean:

package prova;

import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

@Named
@RequestScoped
public class CurrentPage {
	
	private int page = 1;

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}
}

the 'page' attribute in the dataScroller configuration doesn't work if set to 'request' scope. The buttons rewind and forward are blocked and it doesn't work. If I configure it with a 'session' scope that's ok

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list