1 2 3 Previous Next 42 Replies Latest reply on May 27, 2009 6:43 PM by jbalunas Go to original post
      • 15. Re: Contributing a Patch
        nbelaevski

        Kevin,

        New patch per issue is better, however if it is more suitable to create "aggregate" patch for both issues, than it's ok too.

        • 16. Re: Contributing a Patch

          Issue https://jira.jboss.org/jira/browse/RF-6701 has been updated with a cumulative patch that addresses Jira issues RF-6622 and RF-2357. It was easier this time around to just make the patch cumulative, but I'll break them out separately in the future. I create my patch via "svn diff > file.diff". If you would like me to provide patches in a different format, just let me know.

          Kevin

          • 17. Re: Contributing a Patch
            nbelaevski

            Kevin,

            I've just committed your changes, please take a look.

            • 18. Re: Contributing a Patch

              Nick - thanks for committing the patch. I noticed from the changeset that you didn't take the changes to the pickList sample application. Would you prefer I not submit changes to any of the samples apps? Also, it looks like you already fixed issue 3577 which I was going to work on next - I'll poke around for some other issues to work on. Since I'm not a committer, should I just post my intentions here so that work doesn't get duplicated?

              One followup to issue 6622. This issue is linked to forum post http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221441#4221441 where the user would like to show/hide the remove/removeAll buttons. Jira issue 6622 doesn't actually address this need. Is it worth adding new attributes like the following to address this?
              - copyVisible
              - copyAllVisible
              - removeVisible
              - removeAllVisible

              Kevin

              • 19. Re: Contributing a Patch
                nbelaevski

                Hi Kevin,

                Yes, I've missed changes to sample applications, but already fixed that.

                About RF-6622: yes, we have to add these attributes. I'm reopening the issue...

                • 20. Re: Contributing a Patch
                  nbelaevski

                   

                  "klester" wrote:
                  Since I'm not a committer, should I just post my intentions here so that work doesn't get duplicated?
                  Yes, please. It would be helpful definitely.

                  • 21. Re: Contributing a Patch

                    Nick, I'll add the attributes from my previous post to the PickList. These might clash with the moveVisible and fastMoveVisible attributes, so I'm going to make it so that if a button is set to be invisible by any attribute, then it will not be visible. So if users set moveVisible to false but set copyVisible to be true, the component will NOT be shown. Hopefully this will be straightforward for users.

                    • 22. Re: Contributing a Patch
                      nbelaevski

                      Sounds reasonable, I agree.

                      • 23. Re: Contributing a Patch
                        ilya_shaikovsky

                        Yes. I also agree with current solution it seems reasonable..

                        but it seems for me that we need to perform some redesign work in future (in major verison in order no to broke compatibility now) to make more ordered solution for all three compoenents.

                        • 24. Re: Contributing a Patch

                          I also agree. The PickList seems to be an orphan of the OrderedList components, and shares very little with them. A few of the Jira issues out there are to simply make the PickList act consistent with the ListShuttle and OrderingList components. If they all shared the same base class which took care of all the common methods, then I think the code would be easier to maintain, and new attribute support (such as the proposed attributes in this thread) could be added to all three components relatively easily without having to code them multiple times.

                          • 25. Re: Contributing a Patch
                            nbelaevski

                            Definitely, but that's not a point for 3.3.1. We'll return to this topic later (e.g. planning 4.0 version).

                            • 26. Re: Contributing a Patch

                              The patch adding the new attributes to the PickList component has been updated to new Jira Issue https://jira.jboss.org/jira/browse/RF-6729.

                              • 27. Re: Contributing a Patch
                                nbelaevski

                                Kevin,

                                Thank you for another one contribution! I've just committed the new patch. The only problem I see with these new attributes is that the user is still able to move items by clicking them. We can disable items moving by click if copy/remove buttons are hidden. What do you think?

                                • 28. Re: Contributing a Patch

                                  Ah, I didn't realize that you could double-click items to move them back and forth. That's definitely an issue. I agree that we'll have to disable this based on whether the control corresponding to the click action is rendered. If both the 'Copy' and 'Copy All' controls are invisible (not rendered) for example, then the click from source > target should be disabled.

                                  Looking at the PickList/ListShuttle javascript, it appears as if we can just not register the 'click' or 'dblclick' events for the source/target lists in the initialize method based on the controls that are rendered.

                                  Would you like me to take a crack at this?

                                  • 29. Re: Contributing a Patch

                                    Nick - I reopened issue RF-6729 and uploaded a patch to the ListShuttle.js file so that it will avoid registering the click/dblClick events to the source/target lists if the corresponding controls are not rendered. So users cannot move an item from the source > target list if both the 'Copy' and 'Copy All' controls are hidden, and they cannot move an item from the target > source list if both the 'Remove' and 'Remove All' controls are hidden. The changes work on both IE7 and Firefox 3, but you'll definitely want to check it.

                                    For better or for worse, this also changes the behavior of the ListShuttle component. Previously users could move an item between the lists if both the 'moveControlsVisible' and the 'fastMoveControlsVisible' attributes were "false". With the patch I just submitted, users will no longer be able to move items if both these attributes are false.

                                    Kevin