2 Replies Latest reply on Jul 29, 2011 5:27 AM by Anis Boulila

    rendered +haspermission

    Anis Boulila Newbie

      Hello ,


      I'm trying to use the JpapermissionStore API, so when i try to hide a component Richface to verify the permission i use



      rendered="#{s:haspermission('target','action')}"



      , but it will be executed several times and that decrease the performance of my application.


      Any help please .Thankx a lot.




        • 1. Re: rendered +haspermission
          Tim Evers Master

          The fact that your EL expression gets evaluated many times is ultimately not Seam's fault. The fault/reason lies in the JSF framework. The EL expression may be evaluated in each of the JSF phases and can even be evaluated more then once in an individual phase depending on the component.


          I would really recommend you read this article and it's follow up which should be linked from it. This will give you some of the reasons why you experience this problem and some of the ways to avoid it.


          It does not go through every possible solution to your problem. But, once you understand what is going on and see some alternatives maybe you'll find one that suits or can work out your own solution.

          • 2. Re: rendered +haspermission
            Anis Boulila Newbie

            It's very interesting article that clarify many problems of performances in jsf/seam framework.


            Concerning my problem, i resolved it using the jstl


            <c:if >



            that call a custom method (haspermission) on the loading of the page and then set the value returned on the rendered component.


            Thanks a lot.