Hi
I will see if I can find the API that you are asking for and will keep you posted. Just wanted to share this another approach and see if this works for you.
I would try a different way to achieve what you want. From .portal file, create 2 Desktops from Portal Admin Console. Then for each Desktop, modify the look and fee that you want. The desktops can be named in such a way that the language initials will be in the end something like this:
http://yourHost:yourPort/yourWeb/appmanager/anyPortalName/en (English with corresponding look and feel)
http://yourHost:yourPort/yourWeb/appmanager/anyPortalName/fr (French with corresponding look and feel).
Now from Header or Footer, choose language drop down box, when they change the language, you can call java script function or in pageflow, your action method. Based on language they selected, construct the above url using request.getContextPath() etc etc. and Append the language in the end. This will be more dynamic. So in future if you add more languages, just create corresponding desktops and you should be good to go.
One of the main uses of Desktop approach is this one only. Like to have different customized Desktops with different look and feel and say even different books and pages (customized etc).
Also, when user changes the language, you can store this language value in his preferences (custom user preferences file). So once he logs in, in login pageflow (or backing file code), you can get this preference value and redirect to that Desktop. In this way, everytime user do not need to login and then change the language.
Some code snippet in Pageflow login() action method:
String baseUrl = this.getRequest().getContextPath(); //http://host:port/yourWeb
String selectedLanguage = "en"; // Get this from selected drop down box or in login portlet once user logs in from his preferences
String queryString = "/appmanager/somePortalName/" + selectedLanguage;
baseUrl = baseUrl + queryString; //http://host:port/yourWeb/appmanager/somePortalName/en
this.getResponse().sendRedirect(baseUrl.toString());
Try something along these lines.
And also Take a look at http://download.oracle.com/docs/cd/E13155_01/wlp/docs103//javadoc/com/bea/netuix/laf/PortalLookAndFeel.html
Thanks,
Venkata Sarvabatla
Hi Venkat,
ReplyDeleteI am new for weblogic portal, while searching in google found your blog. Very useful.
Thanks,
Sharath Pallerla
Thanks for your feed back.. refer this blog to your friends and known people
ReplyDeleteI feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Same as your blog i found another one Oracle BPM .Actually I was looking for the same information on internet for Oracle BPM and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.
ReplyDelete