2 Replies Latest reply on Jan 30, 2014 2:11 PM by

    RichFaces components + JSF 2.2 Stateless views: how to test?

    Jiří Štefek Newbie

      Hi guys,

       

      the JSF 2.2 has introduced a new feature of stateless views. It is done by setting a transient attribute of f:view to true. All components in such tree become stateless.

       

      Some features of using stateless views :

      • It should bring memory and performance advantages (bigger views -> bigger advantage).

      • Preventing of view expired exceptions.

      (* The @ViewScoped bean in such view will behave like @RequestScoped.)

      • no state is saved and applied to components

       

       

      Questions:

      How should we test this feature with RichFaces components and which components should be tested?

      Some components will probably not fully work since they are dependent on its state (tables?), how do we handle this? By throwing an exception?

       

       

      Regards,

       

      JS

       

       

       

      http://jdevelopment.nl/jsf-22/#1055

      http://jsfcorner.blogspot.cz/2013/05/jsf-22-stateless-views-explained.html

      _______________________________________________

      richfaces-dev mailing list

      richfaces-dev@lists.jboss.org

      https://lists.jboss.org/mailman/listinfo/richfaces-dev

       

        • 1. Re: RichFaces components + JSF 2.2 Stateless views: how to test?

          Basically every RichFaces component is supposed to work in stateless mode,

          even though it can be ineffectively.

           

           

          I.e. every component should keep functioning properly when switching a view

          from non-transient to transient,

          but it is possible that slight modification of an app will be necessary

          (.e.g change of scopes).

           

          I.e. we shouldn't have components that are not able to run in transient

          mode in under at least one configuration.

           

          ~ Lukas

           

           

          On Thu, Jan 30, 2014 at 10:02 AM, Jiri Stefek <jstefek@redhat.com> wrote:

           

          Hi guys,

           

          the JSF 2.2 has introduced a new feature of stateless views. It is done by

          setting a transient attribute of f:view to true. All components in such

          tree become stateless.

           

          Some features of using stateless views :

          • It should bring memory and performance advantages (bigger views ->

          bigger advantage).

          • Preventing of view expired exceptions.

          (* The @ViewScoped bean in such view will behave like @RequestScoped.)

          • no state is saved and applied to components

           

          >

          Questions:

          How should we test this feature with RichFaces components and which

          components should be tested?

          Some components will probably not fully work since they are dependent on

          its state (tables?), how do we handle this? By throwing an exception?

           

          >

          Regards,

           

          JS

           

          >

           

          http://jdevelopment.nl/jsf-22/#1055

          http://jsfcorner.blogspot.cz/2013/05/jsf-22-stateless-views-explained.html

          _______________________________________________

          richfaces-dev mailing list

          richfaces-dev@lists.jboss.org

          https://lists.jboss.org/mailman/listinfo/richfaces-dev

           

           

          • 2. Re: RichFaces components + JSF 2.2 Stateless views: how to test?
            Brian Leathem Master

            Jiří Štefek wrote:

             

            Questions:

            How should we test this feature with RichFaces components and which components should be tested?

            Some components will probably not fully work since they are dependent on its state (tables?), how do we handle this? By throwing an exception?

             

            I expect all our components to behave correctly in stateless views.  If they do not, we should consider it a bug, unless it's for a truly exceptional circumstance.

             

            I recommend changing the showcase or metamer to sue staeless views and testing all components.  We can then consider how to address any failures once we know the scope of the problem.