1 Reply Latest reply on Jun 18, 2008 1:32 AM by benno buesch

    Popup functionality like in Spring Web Flow?

    u janner Newbie

      dear community,


      when we evaluated spring web flow, we found a wonderful feature: you can add an attribute 



      popup=true


       


      to a navigation rule, and any a4j-commandlink/button will render this next page in a popup-div instead of replacing the full page;
      so you can just navigate into a wizard and decide by this attribute, if the wizard will be displayed in a popup-div or in the full page;
      state handling (opening conversations etc) just works the same, doesnt matter if its in a popup or in a full page.


      we tried to implement a popup-page like this in SEAM with richfaces, but have several problems :
      there is a userList.xhtml page that displays data of some users in a list; if you click on a user's link we want to open a popup div containing editUser.xhtml; a new (nested) conversation should be started then, which holds the backingbeans for editUser.xhtml; when the user clicks on save or close the div should be closed and the nested conversation should be ended;


      we used an a4j:modalPanel around an a4j:include;


      but the a4j include may not include the editUser.xhtml directly, as this page would become part of the component tree and would call to its backing beans before the popup is opended.
      so we put a kind of a loader page  in the a4j:include which - after being activated with the popup - loads the editUser.xhtml (we found this solution at http://sophisticated-it.de/index.php/2007/07/21/wizard-popup-divs-mit-ajax4jsf/)


      this is quite more complex as it was with spring webflow (and we're still experiencing a bunch of bugs, like a datascroller not posting all of the datatable's data when going to nextPage).
      is there an easier solution with SEAM and richfaces?


      any hints are highly appreciated!


      tia and regards, uwe!

        • 1. Re: Popup functionality like in Spring Web Flow?
          benno buesch Newbie

          spring webflow's approach really seems interesting, i wonder if that could become a seam feature one day?


          we had also a hard time to implement a wizard in a popup div with conversation scoped components; we then switched from using a nested conversation to the use of


          <a4j:keepAlive beanName="aBean" />



          this tag extends the event scope for aBean over all following ajax-requests.
          we would have preferred using a nested conversation as this is the native seam scope, and this extended event scope feels like an additional scopetype. but it solved our problems.


          how do other seam users scope components/backing beans, that are  only needed within a popup wizard?