1 2 Previous Next 24 Replies Latest reply on Aug 6, 2014 10:02 AM by Ashish Awasthi

    [ ADF, JDev12.1.3 ] How to hide or add UI components in a page before it's displayed?

    Flattit

      Hallo,

       

      I started to tackle this question with the kind rohanwalia () in this thread Re: Re: [ ADF, JDev 12.1.3 ] How to hide menu items in function of the logged-in user but perhaps it's better do make the question in a separate thread.

       

      I  have a home.jspx page with some UI components (menubars, input texts, buttons, ...) .

       

      Unbounded task flow

      loginPage.jspx ----- loginSuccess -----> home.jspx

       

      In function of the logged in user I have programatically to hide (e.g. some buttons and menu items) or to add some UI components in the home.jspx page.

       

      So in the (request scope, right?) managed bean associated with the page I'd like to write a method that before the home.jspx is displayed makes the task above.

       

        initPage() {

          // Here I call an AM method that for each component says if

          // - in function of the logged user - it has to be visible or not.

          // These infos are stored in boolean vars, one for each component.

          it1.setVisible(it1visible);

          it2.setVisible(it2visible);

          b1.setVisible(b1visible);

          ...

        } 

       

      How can I do to make this method automatically execute when the page is rendered?

       

      Thanks,

      Federico

        1 2 Previous Next