1 2 Previous Next 19 Replies Latest reply on Jun 5, 2010 9:45 PM by Leonid Sokolin

    listShuttle (in modal panel) rerender problem

    Ana B Newbie

      Hi,

      I'm having problems with listShuttle selection after rerendering. This seems to be a known bug because I came across this: https://jira.jboss.org/jira/browse/RF-2238.
      We are using RichFaces 3.2.0 and still see this problem happening with listShuttles in modal panels.

      Does anyone know if this has been fixed or will be fixed?

      Thanks.

        • 1. Re: listShuttle (in modal panel) rerender problem
          Nick Belaevski Master

          Hi,

          RF-2238 is about a4j:ouputPanel, but not about rich:modalPanel

          • 2. Re: listShuttle (in modal panel) rerender problem
            Ana B Newbie

            Yes I know it's not about the modalPanel. I was just wondering if anyone knew if the similar problem of rerendering listshuttle in modalPanel has been fixed.

            • 3. Re: listShuttle (in modal panel) rerender problem
              Ilya Shaikovsky Master

              there should be no such problem within Modal Panel with LS component. Please show your code and also describe your problematic use case

              • 4. Re: listShuttle (in modal panel) rerender problem
                Ana B Newbie

                Sorry I am waiting for my boss to authorize me pasting code examples, even if it's just dummy code :(

                In the meantime, I see that someone posted their code example here (see the very last comment in JIRA):
                https://jira.jboss.org/jira/browse/RF-2239

                If that's not sufficient, I'll post my own code when/if my boss approves it.

                Thanks again for the help.

                • 5. Re: listShuttle (in modal panel) rerender problem
                  Ilya Shaikovsky Master

                  description also needed.. "do not works" - too general phrase.. code snippet looks fine for the first look.

                  • 6. Re: listShuttle (in modal panel) rerender problem
                    Ana B Newbie

                    Ok, on my page I have a table and a bunch of buttons. Users enter search criteria by clicking on one of those buttons and having a modal Panel show up. This panel has a rich:listShuttle in it.

                    On the same page I have a reset button. That button clears all the search criteria on the backing bean and reRenders the table and modal panel listShuttle. After this reRendering, if the user tries to re-enter search criteria and opens the modalPanel, the listShuttle will not work. Basically nothing can be selected on the left, Copy button is still disabled. If the modal panel is closed again and then re-opened, listShuttle works fine (items can be selected).

                    I have other modal panels (with checkboxes, tables, etc.) that get rerendered and they work fine. It's only with listShuttles that I see this problem.

                    Let me know if you need more information. Thanks.

                    • 7. Re: listShuttle (in modal panel) rerender problem
                      Ivan Elistratov Newbie

                      Hi all. I have the same problem with LS inside modal panel. LS works fine only at the second time (third, fourth and so on).

                      When I open modal panel at first time I can't select any item at the right part of LS, so copy button is always disabled. When I close the panel and reopen it again everithing is OK.

                      I tried 3.2.2.GA and 3.3.0-SNAPSHOT, but the problem doen't disappear :(

                      • 8. Re: listShuttle (in modal panel) rerender problem
                        Ilya Shaikovsky Master

                        sorry.. I've also reproduced this finally.

                        Thank for your patience.

                        https://jira.jboss.org/jira/browse/RF-2239

                        reopened.

                        • 9. Re: listShuttle (in modal panel) rerender problem
                          Boubou CAMARA Newbie

                          Hi,
                          we are experiencing the same problem OrderingList inside modal panel.

                          Environment :
                          - richfaces 3.2.2
                          - facelets
                          - Mojara JSF (Sun RI)

                          Context :
                          - an orderinglist in a modal panel
                          - a4j:commandButton, oncomplete of which the modal panel is opened

                          As a result :
                          - the modalpanel is opened and the orderinglist displayed inside it
                          - BUT I am unable to select a row of the list by mouseClicking on it (there is no javascript error)
                          - even though using the keyboard to navigate from one row to another works well.
                          - when I close the modalPanel, and click on the same a4j:commandButton the SECOND TIME, everything work fine:
                          I can select a row by mouseclick as it should.

                          Observations :
                          - when I replace the modalPanel by simple richpanel, no such behaviour happens
                          - No javascript error is showned
                          - this behaviour is the same for internet explorer or firefox.


                          • 11. Re: listShuttle (in modal panel) rerender problem
                            Kuala Lumpur Newbie

                            Hi,
                            I tried your workaround but there are side effects: if I click on the "up" or "down" buttons, the selected element is moved 2 rows updward or downward; it completely breaks the logic..Does anyone have a workaround here, or a hint?
                            Thanks

                            • 12. Re: listShuttle (in modal panel) rerender problem
                              Ana B Newbie

                              In JIRA I can see that this issue is now scheduled to be fixed in RichFaces 3.3.0. That's great. ilya_shaikovsky thanks for looking into it.

                              In the end we decided that we couldn't wait for that release. Instead I've built our own listShuttle component. It consists of 2 scrollableDataTables and some command buttons :). It actually wasn't too difficult to do and looks exactly like the rich:listShuttle.
                              I have the whole thing as a facelet tag and now just call that single tag when I need to use it. It took a day to get it working and unit tested. The best part is, selection works after rerendering in a modal panel. :)

                              • 13. Re: listShuttle (in modal panel) rerender problem
                                Kuala Lumpur Newbie

                                Hi AnaB,
                                so you replace the listshuttle by your own component, and you keep the richfaces modalPanel? that's great!!!
                                In my case it was an orderinglist contained in a modalpanel; the problem is really weird: when I set the modalpanel's attribute showWhenRendered to "true" (which makes the modal panel opened as default) everything goes fine.
                                Where,in your opinion, was the problem with using listsuttle in modalpanel? How would you implement the orderinglist functionnality without using rich:orderinglist?
                                Thanks

                                • 14. Re: listShuttle (in modal panel) rerender problem
                                  Ana B Newbie

                                  The problem with rich:listShuttle in a modalPanel is that selection does not work after rerendering. I have not yet had the chance to use the orderingList so I can only assume by reading the other posts on this topic that the problem is similar.

                                  Before I created my custom listShuttle I had to make sure that the rich:scrollableDataTable selection (when in modalPanel) was not broken after rerendering. It wasn't :)
                                  As I said, as far as the orderingList goes, it looks like it COULD be done with the scrollableDataTable. I would assume that the buttons on the right would just:
                                  A. call a method which would re-order the table rows
                                  B. rerender the table

                                  The trick is to test that it would all work in a modalPanel after rerendering. I've found that problems do tend to crop up when you least expect them. Sometimes the fix is simple and sometimes it's not.
                                  The best advice I can offer is to spend an hour or two and just try it out. It LOOKS pretty straightforward. :)

                                  1 2 Previous Next