[richfaces-issues] [JBoss JIRA] Commented: (RF-8244) dataTable built-in filter cause form values to be submitted to different rows.

Hugh Nguyen (JIRA) jira-events at lists.jboss.org
Sun Jan 10 21:34:30 EST 2010


    [ https://jira.jboss.org/jira/browse/RF-8244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12503211#action_12503211 ] 

Hugh Nguyen commented on RF-8244:
---------------------------------

I have this in web.xml:

    <context-param>
        <param-name>org.richfaces.queue.global.enabled</param-name>
        <param-value>true</param-value>
    </context-param>

There are no other queue settings.

I used LiveHttpHeaders addon for firefox to watch the http request/response and I could see two requests being sent for the 2 keystroke on the filter.

> dataTable built-in filter cause form values to be submitted to different rows.
> ------------------------------------------------------------------------------
>
>                 Key: RF-8244
>                 URL: https://jira.jboss.org/jira/browse/RF-8244
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tables
>    Affects Versions: 3.3.1, 3.3.2.CR1, 3.3.2.GA, 3.3.2.SR1, 3.3.3.BETA1
>            Reporter: Hugh Nguyen
>
> This is regarding rich:dataTable built-in filtering.
> The filter requests submit and process the entire form that enclosed the table, including all the form fields inside the table.
> Besides the issue of inefficiency, this submission cause an obscure bug:
> The form data of the first row before filtering SOMETIMES get submitted into the first row that appear after the the filtering request is completed.
> For example, I have an Invoice table like this
>                                                 Invoice No         Invoice Amt
> (filter input)                             [             ]
> ------------------------------------------------------------------------------------------------
>                                                   INV1                  [100.00]
>                                                   INV2                  [200.00]
>                                                   INV3                  [300.00]
> The filterEvent is set to 'onkeyup'
> Now, if I type quickly type INV3 to the filter input, the table will show only invoice INV3, which is expected, but the Invoice Amt for INV3 would become 100.00, which is the value for INV1. The value is not just the screen value, but it's also set into the backing bean for INV1.
> If I leave filterEvent value as default 'onblur', the bug is less likely to occur, but still can happen if I manage to cause the Ajax requests to be sent fast enough.
> For Richfaces configuration, I enabled the global queue in web.xml.
> With a bit of tracing, I found that all the input field values present in the table before the filtering happen is sent along with the Filter input during the enclosing form submission, and there is no ajaxSingle attribute for the Filter input. I guess that there is some mix up of processing the multiple filter requests that come before the filtered result is returned, and this cause the submission value to go into the wrong row(s).
> My suggestion is that there should be some way to cause the form to only process the Filter input, all other inputs should be ignored, in a manner similar to ajaxSingle attribute for the components that support it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list