Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resetRows method to dataTable to reset rows attribute #4573

mertsincan opened this Issue Feb 22, 2019 · 0 comments


None yet
1 participant
Copy link

mertsincan commented Feb 22, 2019

Reported By PRO User;

Use case:
The number of rows the datatable should display may change on Ajax request, because we have a value expression bound to the rows property. So it is necessary that the bound EL expression gets recalculated. However, the value of the rows property is stored in the StateHelper. Once a value has been set into the StateHelper, it will be returned from there. Only if it is null, then the bound EL expression will be re-evaluated, see javax.faces.component.ComponentStateHelper.eval(Serializable, Object):

public Object eval(Serializable key, Object defaultValue) {
        Object retVal = get(key);
        if (retVal == null) {
            ValueExpression ve = component.getValueExpression(key.toString());
            if (ve != null) {
                retVal = ve.getValue(component.getFacesContext().getELContext());


        return ((retVal != null) ? retVal : defaultValue);

So, we intended to reset it to null so the EL expression gets recalculated.

@mertsincan mertsincan self-assigned this Feb 22, 2019

@mertsincan mertsincan added this to the 7.0 milestone Feb 22, 2019

@mertsincan mertsincan added enhancement and removed new feature labels Feb 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.