RF-2238 is about a4j:ouputPanel, but not about rich:modalPanel
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.
there should be no such problem within Modal Panel with LS component. Please show your code and also describe your problematic use case
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):
If that's not sufficient, I'll post my own code when/if my boss approves it.
Thanks again for the help.
description also needed.. "do not works" - too general phrase.. code snippet looks fine for the first look.
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.
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 :(
we are experiencing the same problem OrderingList inside modal panel.
- richfaces 3.2.2
- Mojara JSF (Sun RI)
- 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
- 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.
- when I replace the modalPanel by simple richpanel, no such behaviour happens
- this behaviour is the same for internet explorer or firefox.
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?
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. :)
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?
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. :)