11 Replies Latest reply on Jun 11, 2015 3:57 PM by Daniel López

    ADF Refresh page jsf with page fragments jsff after set session variable

    Daniel López

      Hello.

      I have a template which includes a button that let you select a profile, you push the button and appear the available profiles, choose one and push accept. After that I set a variable session successfully.

       

       

      I have a "First" jsf page with two jsff page fragments from a View Link. The view link is composed by a headerView and detailView. The headerView had a bind variable. What I need is that parameter (bindVariableParameter) can be set by the session variable of the template.

       

       

      This is what I get:

       

       

      I am in a home page (separate Application Module), I push the template button before I load de "First" jsf page and after that I go to the "First" jsf page the information is loaded successfully. What I do in the Application Module is something like that:

       

       

          protected void prepareSession(Session session) {

          Map sessionScope = ADFContext.getCurrent().getSessionScope();

          String company = (String)sessionScope.get("compId");

          System.out.println("Default Comapny in BC is: " + company);

          super.prepareSession(session);

          this.getSession().getUserData().put("Company", company);

          System.out.println("After setting value in userData map of BC");

          }

       

       

      And in the bind variable expression of the headerView I use:

       

       

          adf.userSession.userData.Company

       

       

      It works great!!!! But!!!!

      When I press the button again and I choose another profile, the info is not updated. Neither in the headerView neither in the detailView.

       

       

      Also, when I go to the "First" jsf page (without previously push the template button), I got no info, which is right, because I don't have any session variable. After that I push the template button and select the profile, but the page is not refreshed.

       

       

      I tried several ways to to this but I'm lost.

       

       

      Could you help me?

       

       

      Regards.