Skip to Content
author's profile photo
Former Member

locale in Search Component

Hello All,

anyone knows how to get languages of the user that is accessing custom serach component (based od articel: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/Developing%20a%20Search%20Component%20for%20KM%20Search%20iView.article)> ??

ive tried to use IPortalComponentRequest request = (IPortalComponentRequest) dynPage.getPageContext().getRequest();in the method setDynPage() (as described in:

https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=http% 3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D31602 )

but the problem is that setDynpage() is executed after renderComponent() method, so i cannot use this to get local of the user and depending on that set language-depending texts.

Do you know how can i solve it?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 30, 2005 at 01:40 PM

    Hi Karol,

    a possible method to retrieve the user is:

    AccessContextFactory.getInstance().getContext().getUser().getUniqueID();

    This provides you access to the users locale.

    Regards Matthias

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Edmund,

      yes, unfortunately this function is (as far as I know) available with NW04 SPS12.

      Depending on your detailed needs, it might be helpfull to store the locale in the perstistence map during the first circuit.

      It will then be permanently available, but not in the first call. That stays an issue.

      I'm thinking about a better solution.

      Regards Matthias Röbig-Landau