You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Adrian Sud (JIRA)" <ji...@apache.org> on 2010/11/10 22:44:14 UTC

[jira] Created: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

FilterForms cannot be added to both top and bottom of a DataTable
-----------------------------------------------------------------

                 Key: WICKET-3157
                 URL: https://issues.apache.org/jira/browse/WICKET-3157
             Project: Wicket
          Issue Type: Bug
          Components: wicket-extensions
    Affects Versions: 1.4.13
         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
            Reporter: Adrian Sud


Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.

I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3157.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg  (was: Peter Ertl)

I dont see how this couldve worked any better in 1.2, and since no quickstart was provided that demonstrated the working behavior im going to let this one go.

the problem is the same as it wouldve been in 1.2, both toolbars share the same form, so they will both try and push their value into the model. last component to push the value wins, in fact it can be half components from the top toolbar and half components from the bottom - it doesnt mean the last toolbar wins, rather the last component to be traversed wins.

i think the desired behavior can be achieved if form components inside the filter toolbar checked which toolbar was submitted before pushing the value into the model, and only push if it was their toolbar. a patch for this is welcome. should be relatively easy if the toolbars implemented IFormParticipant and vetoed processing of their children if the toolbar was not the one submitted.

> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>            Assignee: Igor Vaynberg
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Adrian Sud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932683#action_12932683 ] 

Adrian Sud edited comment on WICKET-3157 at 11/16/10 5:15 PM:
--------------------------------------------------------------

How would using two different filter states work?

If you have a datasource which uses two different filter states, how do you figure out which one to use when actually fetching data, i.e. which one was intended to be submitted by the user?

And given that in 1.4.x, I must add elements with wicket:ids of "focus-tracker" and "focus-restore", is it even possible to do these separately, or could they have separate states and yet share the focus elements?

It may be that I have misunderstood something fundamental, but this used to work in wicket 1.2.x (we upgraded from that version to 1.4 directly, so not sure about 1.3.x)



      was (Author: adrian@pigsflew.com):
    How would using two different filter states work?

If you have a datasource which uses two filter states with two different filter states, how do you figure out which one to use when actually fetching data, i.e. which one was intended to be submitted by the user?

And given that in 1.4.x, I must add elements with wicket:ids of "focus-tracker" and "focus-restore", is it even possible to do these separately, or could they have separate states and yet share the focus elements?

It may be that I have misunderstood something fundamental, but this used to work in wicket 1.2.x (we upgraded from that version to 1.4 directly, so not sure about 1.3.x)


  
> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>            Assignee: Peter Ertl
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Adrian Sud (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Sud updated WICKET-3157:
-------------------------------

    Attachment: list-example.rar

quick start demonstrating the issue

> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Ertl reopened WICKET-3157:
--------------------------------


Since you say it worked for 1.2 (which I don't know anything about) I am going to reopen this.

Maybe some 1.2 expert will help us here.

> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>            Assignee: Peter Ertl
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Adrian Sud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933980#action_12933980 ] 

Adrian Sud commented on WICKET-3157:
------------------------------------

I will add a 1.2 quickstart tonight demonstrating it working the way I would expect it to.

That being said--if there is simply a new way of doing things, then this problem *should* be closed, I just didn't see anything documenting it in the migration guides, and couldn't figure out how to do it through my own experiments.

> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>            Assignee: Peter Ertl
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932673#action_12932673 ] 

Peter Ertl commented on WICKET-3157:
------------------------------------

I don't see a defect in the behavior or the quickstart - things work as expected.

You are using one FilterLocator for two FilterToolbars pointing to the same physical instance of a filter state.

The bottom toolbar overwrites the values of the top toolbar (last wins).

If you want two independent toolbars you need two different filter locators with two different filter states.

In order to sync upper and lower toolbar you have to manually achieve this by linking the two filter states in some way using custom code.

> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Adrian Sud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932683#action_12932683 ] 

Adrian Sud commented on WICKET-3157:
------------------------------------

How would using two different filter states work?

If you have a datasource which uses two filter states with two different filter states, how do you figure out which one to use when actually fetching data, i.e. which one was intended to be submitted by the user?

And given that in 1.4.x, I must add elements with wicket:ids of "focus-tracker" and "focus-restore", is it even possible to do these separately, or could they have separate states and yet share the focus elements?

It may be that I have misunderstood something fundamental, but this used to work in wicket 1.2.x (we upgraded from that version to 1.4 directly, so not sure about 1.3.x)



> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>            Assignee: Peter Ertl
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3157) FilterForms cannot be added to both top and bottom of a DataTable

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Ertl resolved WICKET-3157.
--------------------------------

    Resolution: Invalid
      Assignee: Peter Ertl

> FilterForms cannot be added to both top and bottom of a DataTable
> -----------------------------------------------------------------
>
>                 Key: WICKET-3157
>                 URL: https://issues.apache.org/jira/browse/WICKET-3157
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4.13
>         Environment: Apache Tomcat 6.0.29, Java JDK 1.6.0.17
>            Reporter: Adrian Sud
>            Assignee: Peter Ertl
>         Attachments: list-example.rar
>
>
> Because of the way the filter toolbar is set up in Wicket-Extensions 1.4.x, adding two FilterToolbars (through dataTable.addTopToolbar() and dataTable.addBottomToolbar()) does not work properly; the toolbar added last always overwrites any changes to the filter by any other toolbars.
> I am unaware of any workarounds, but this worked in Wicket 1.2.x. I am not certain of any versions between then and now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.