|
| Hello All
We have JSR 168 portlet which allows users to change their language in LDAP . Whole flow of portlet is Portlet Code --- >> PUMA SPI --->> LDAP .
It works great . but when user select language from drop down and press ok . it does not change to selected language for whole portal . if users press submit button with in portlet again then it will change language of whole portal .
after first click it change language in LDAP but to show in portal page and labels users has to click twice.. which is bugging lots of people and. can any one has idea . why its is happeing ?
here is snipet of code we have in processAction method.
public void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException
{
if(request.getParameter("prf_submit") != null)
{
String sLanguage = request.getParameter("language");
try
{
Context ctx = new InitialContext();
PortletServiceHome psh = (PortletServiceHome)ctx.lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome");
if(psh != null)
{
PumaHome service = (PumaHome)psh.getPortletService(com.ibm.portal.um.PumaHome.class);
PumaController pc = service. getController((HttpServletRequest)reques
t);
com.ibm.portal.um.User cUser = pc.getCurrentUser();
HashMap mAttr = new HashMap();
mAttr.put("preferredLanguage", sLanguage);
pc.setAttributes(cUser, mAttr);
}
}
catch(PumaException pe)
{
pe.printStackTrace();
}
catch(NameNotFoundException ex)
thanks in advance
palnil
|
|