3 Replies Latest reply on Nov 10, 2015 4:31 AM by Michal Petrov

    Guidance requested on getting previous screen to refresh

    Arnie Morein Novice

      This is not a purely RF question, but of the Places listed, I thought I'd put it here.


      We have a UI pattern we follow through out out applications:


      List Screen where user can enter filter criteria and get limited (100 max) results, shown in a data table with an Action column where they can select Edit or View (based on rights); and an optional Add button if they have that right. Then there is the separate edit screen where they do the add/update/delete as desired.


      The app moves the user back and forth based on JSF navigation in these general cases.


      In the Seam days, I’d issue an event back to the list screen to execute the Refresh method so that when they return, the row they just added/edited is shown.


      I’ve been trying to do that with CDI/RF 4x and though the event fires and is observed, none of the previous criteria are present when the refresh method executes, which at a minimum, explains why the data table doesn’t appear to change when the user is returned to the list screen.


      Things get even more complex when the edit screen was simply a modal panel.


      The absence of the previous criteria leads me to think that the observed event is happening in a separate thread with a new instance of the list bean, which isn’t what I want.


      So, in absence of the old Seam page events, how does one get the message from the edit bean to the list bean that it needs to refresh before the user returns? In fact, I want to pass event cargo that includes the ID of the new/edit record so the data table is on the right page so that record appears.