5 Replies Latest reply on Nov 17, 2009 5:18 PM by jguglielmin

    Icefaces SessionRenderer in Seam 2.2.0

    rasave

      Has anyone been successful in using the new Icefaces SessionRenderer API for AJAX Push in Seam?


      Is says in the Seam Icefaces guide (JBoss Seam Integration) that it should be working (not only using the old RenderManager) but whatever I do I get no pushed updates in the web client..


      -ra

        • 1. Re: Icefaces SessionRenderer in Seam 2.2.0
          nickarls

          Should work, they have examples on their site

          • 2. Re: Icefaces SessionRenderer in Seam 2.2.0
            rasave

            Are there really examples where they only use the SessionRendered without the RenderManager? Could you point me to such an example? And just to sort things out: Is the expected behaviour that if I have a simple page such as:






            <h:outputText value="#{bean.value} />
            <ice:form>
               <ice:commandButton action="#{bean.longSubmit()}" value="Long submit" />
            </ice:form>






            And a simple Seam bean such as:




            @Name("bean") @Scope(ScopeType.SESSION)
            public class Bean implements Serializable {
            
            public void longSubmit() {
            
               private String value = "";
            
               SessionRenderer.addCurrentSession("test");
               
               <-- A unit of time consuming work that sets value -->
            
               SessionRenderer.render("testCenter");
            
               <-- Another unit of time consuming work that sets value -->
            
               SessionRenderer.render("testCenter");
            
            }
            
            public String getValue() {
                return value;
            }
            
            }
            



            Would it be true that the outputText on the page would be updated during thread-execution (and not after). The only way I achieved this was by setting the bean to Scope.APPLICATION and have the submit-method being @Asynchronous.. but as you probably understand I can't have that in the application...


            Can someone at least point out what the expected behavior is?


            -ra


            • 3. Re: Icefaces SessionRenderer in Seam 2.2.0
              nickarls

              I recall using the SR myself but can't recall when flushing is done. Judy G will probably appear and answer you soon ;-)

              • 4. Re: Icefaces SessionRenderer in Seam 2.2.0
                rasave

                Ok. I look forward to that. :)


                You may also disregard that I render testCenter while adding the session to test in my example above.. that was a simple copy-and-paste-mishap.


                -ra

                • 5. Re: Icefaces SessionRenderer in Seam 2.2.0
                  jguglielmin

                  For an example of SessionRenderer with Seam, you can review SeamInAction code for open18ice