Forum Stats

  • 3,851,982 Users
  • 2,264,055 Discussions
  • 7,904,924 Comments

Discussions

AM access during Authentication Filter

13»

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond

    @Filip Huysmans I'm somewhat confused by the long discussion. Can you summarize the current state, please?

    I understood that you had two problems.

    Can you access the application module from your filter?

    Can you set the language inside the filter?


    Timo

  • Filip Huysmans
    Filip Huysmans Member Posts: 298 Bronze Badge

    Hi @Timo Hahn ,

    I am able to access the AM from within the filter.

    Now I still want to access the FacesContext from inside this filter, to set the language.

    Accessing the FacesContext still fails.


    Thx

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond

    Do you have access to the DCDataControl?

    In this case, you can call setLocaleContext() on the DCDataControl the rest should be handled for you. This internally will call the setLocaleContext() on the ADF BC Session object and the application module.


    Timo

  • Filip Huysmans
    Filip Huysmans Member Posts: 298 Bronze Badge

    Hi @Timo Hahn ,

    I am not accessing the MC, but the FacesContext:

    FacesContext.getCurrentInstance().getViewRoot().setLocale(Locale.FRENCH);
    

    I suppose this is not the same thing as the ADF BC Session object or am I wrong?

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond

    The access to the viewRoot will not work as it is not present inside the filter.

    I would set the locale directly to the DcDataControl. This will set it to the application module, and this should allow you to get the correct data inside the application module.


    Timo

  • Filip Huysmans
    Filip Huysmans Member Posts: 298 Bronze Badge

    Hi @Timo Hahn & @dvohra21 ,

    I stop this thread, since we can not find a solution to my request:

    Access the application module and FacesContext from a filter

    This works without any issue with jspx, but once the facelets are enabled, this fails.

    No idea why there is a difference between those 2 approaches at the level of the filters.


    Thx a lot for you help.


    Filip

  • dvohra21
    dvohra21 Member Posts: 14,664 Gold Crown

    Which two servlets? The downloadable sample zip does not include any servlet.