You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/09/04 12:04:08 UTC

[jira] [Resolved] (WICKET-4730) Filter component does not clear filter fields

     [ https://issues.apache.org/jira/browse/WICKET-4730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4730.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.1
         Assignee: Martin Grigorov

Fixed it by adding an additional constructor where you can pass your own instance for original state.
The old constructors still use the form's model object as original state.
                
>  Filter component does not clear filter fields
> ----------------------------------------------
>
>                 Key: WICKET-4730
>                 URL: https://issues.apache.org/jira/browse/WICKET-4730
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 6.0.0-beta3
>            Reporter: Andreas Kuhtz
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: commit-347c459
>
>
> The GoAndClearFilter.onClearSubmit() does not clear filter fields because the originalState member has the current values of the filter. I think it should create a new instance of the originalState class instead of clone the model.
> To verify use the phonebook sample (https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/phonebook). The clear only works if "go" was not pressed after enter some values in the filter, but if you press go and then want to clear the filter it keeps the values.
> Attached is a patch that makes the phonebook sample work.
> It might also be useful if the originalState attribute were made protected or accessible via protected method to allow users to overwrite the onClearSubmit() method and access the originalState attribute.

--
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