Changing shell, look & feel dynamically in desktop backing file
(I apologize if this post is showing up twice - I tried posting with
google groups but it doesn't appear at forums.bea.com, so I wanted to
post again using xnews to make sure it shows up.)
I have a backing file that I am using with my desktop and I need to be
able to change the shell and look & feel dynamically, based on the page
that is currently active. I am doing the following in the preRender()
method:
String newLAF = "myLookAndFeel";
String newShell = "myShell";
// here is where I would determine the appropriate LAF and shell based on the current page
customizationContext = new CustomizationContext(Locale.getDefault(), request);
customizationContext.setVisitorMode(true);
DesktopView desktopView =
PortalBeanManager.getPortalCustomizationManager().getDesktopView(customizationContext, webAppName, new PortalPath(portalPath), new DesktopPath(desktopPath));
DesktopInstanceId dii = desktopView.getDesktopInstanceId();
DesktopInstance di = PortalBeanManager.getPortalCustomizationManager().getDesktopInstance(customizationContext, dii);
LookAndFeelDefinitionId lookAndFeelId = null;
for(int i = 0, n = lookAndFeelDefinitions.length; i < n; i++) {
if(newLAF.equals(lookAndFeelDefinitions.getDefinitionLabel())) {
lookAndFeelId = lookAndFeelDefinitions[i].getLookAndFeelDefinitionId();
break;
di.setLookAndFeelDefinitionId(lookAndFeelId);
ShellDefinitionManager shellManager = PortalBeanManager.getShellDefinitionManager();
ShellDefinitionId shellId = null;
ShellDefinition[] shellDefinitions = getShellDefinitions(webAppName, request.getLocale(), request);
for(int i = 0, n = shellDefinitions.length; i < n; i++) {
String shellName = shellManager.getShellView(customizationContext, shellDefinitions[i].getShellDefinitionId()).getMarkupView().getMarkupDefinition().getName();
if(newShell.equals(shellName)) {
shellId = shellDefinitions[i].getShellDefinitionId();
break;
di.setShellDefinitionId(shellId);
PortalBeanManager.getPortalCustomizationManager().updateDesktopInstance(customizationContext, di);
This works just fine, but I once the portal renders itself in my
browser, I usually have to refresh the page before the changes to the
shell and look & feel are visible. I would like to do this in the
init() method of the backing file but I do not know how to determine
the current active page from within init.
I would appreciate any help you all could give me in finding a solution
so I do not have to refresh the page in order to see the shell and look
& feel changes. Thanks in advance!
Andy
We essentially have 2 "portals" running inside 1 .portal file. We'd
like to be able to use single sign on and entitlements to allow/restrict
access to various parts of the 2 portals (where certain books are
consider part of portal "A" and others part of portal "B"). If you are
logged in as a super-user, you will be able to access everything. If
you are logged in as user type "A" you can only access portal "A," and
similarly for user type "B" and portal "B."
Portals A and B have each have a distinct header, footer (i.e. shell),
and look and feel (skeleton and skin). If a super-user is looking at
portal A, the portal should have portal A's header, footer, and look and
feel, and similarly for portal B.
How would you recommend we accomplish this? Would it make more sense
(and is it possible) to have the header and footer jsps determine what
content to render based on the current book or page, and then use the
code you suggested below to change the look and feel dynamically?
Thanks,
Andy
jolleyc wrote:
in order to pick up the changes for that request you will need to do a redirect back to the server (our login examples shwo you how to do this). this is because the control tree has already been retrieved from the database (so you need to go back and get a new version).
I quick note: If you plan on doing this a lot this is quite a heavy process. if you just need to change the lookAndFeel on the fly you can look at the following ( i t think this is in the tutorial portal)
A) Modify the shell to include a jsp and backing file
<netuix:header>
<netuix:jspContent backingFile="com.acme.DynamicLookAndFeelHeaderBacking" contentUri="/portlets/lookAndFeel/dynamicLookAndFeelHeader/dynamicLookAndFeelHeader.jsp"/>
</netuix:header>
B) backing file looks like
public void init(HttpServletRequest request, HttpServletResponse response)
// Get the session from the request
HttpSession session = request.getSession();
// Get the LookAndFeel object from the PrimaryTheme in the request
LookAndFeel lookAndFeel = LookAndFeel.getLookAndFeel(request);
if (request.getParameter("defaultButton") != null)
session.setAttribute("skin", "default");
if (request.getParameter("textButton") != null)
session.setAttribute("skin", "text");
if (request.getParameter("classicButton") != null)
session.setAttribute("skin", "classic");
String selectedSkin = (String) session.getAttribute("skin");
if (selectedSkin != null)
lookAndFeel.setSkin(selectedSkin);
lookAndFeel.setSkeleton(selectedSkin);
lookAndFeel.reinit();
Similar Messages
-
Want to change the Look & Feel of Login page
Hi,
I am using Oracle Webcenter 11g (Version 11.1.1.2.0) . I want to change the look & Feel of Login.jspx . I have gone through the extension document
"*http://www.oracle.com/technology/products/webcenter/pdf/owcs_r11_extend_spaces_wp.pdf"*, it listed about customizing the Landing page .
But i want to change the look & feel of *"Login.jspx"* page along with want this as landing page. How i will achieve this, will it be done through the same document that i am referring .Please suggest me.
Thanks,
SwagatikaThanx.
I just wonder if i could change the global toolbar of the login page though this or not.
As i changed the webcenter global tool bar (i,e increase the height of the toolbar) using CustomSiteTemplate, but the login page toolbar height remains as it is.
So how could i achieve this and one more thing how could i make the login page as the landing page and once login done it should forwarded to webcenter spaces. Please reply asap.
Thanks,
Swagatika -
Desktop Backing File in Production - How?
Hello.
Is there a way to associate a desktop backing file with a production desktop? (i.e one created entirely out of portal admin - NOT a .portal file).
I know you can create a desktop based upon a .portal file - is this the only way it can be achieved?
Can't find another way...
Any help much appreciated.
Weblogic 8.1 Portal. Service Pack 4.Hello,
The browser could be caching the old version. The easiest/quickest way around this (and a pretty good practice IMHO) is to version your files, i.e. instead -
<script src="fizzbang.js" type="text/javascript"></script>consider using -
<script src="fizzbang_01.js" type="text/javascript"></script>then when you modify the script, you simply increment -
<script src="fizzbang_02.js" type="text/javascript"></script>the point here is that from the browsers perspective this is an entirely new file (different filename) so it will need to fetch the file from the webserver rather than using a cached version.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
SAP Portal Custom Theme change UI Look & Feel of ESS screens - Possible ?
Hi,
I have a requirement where the look and feel of the UI controls of the ESS/MSS applications have to be different - Jazzy
I know XSS homepage framework is for the customisation of Areas, Sub Areas. What I am more interested is only the look and feel UI of ESS/MSS applications.
If I change the standard theme of portal using Theme Editor and create a new custom theme with different back ground colors, fonts, sizes for all the UI controls,.Will the customised Theme apply on the standard ESS / MSS screens ? Also my doubt is we are using EHP3 and I am not sure how many are Webdynpro java based or webdynpro Abap based.
Will the theme apply to both WDA and WDJ application UI controls of ESS/MSS?
Any inputs in this regard will be of great help. thanks in advance.
Regards,
SreeramHi Sreeram,
Yes, you should be able to apply the portal theme to both WDA and WDJ applications. This [posting|Re: webdynpro for abap using portal theme nw2004s, sp12; might help you.
BRgds,
Simon -
Changing theme (look & feel) in ICAN505 Enterprise designer
Hello
I'm running different Enterprise designers against different repositories and I would like the GUI to appear in different "styles", to make it easier for me to recognise what ED/repository I'm running against.
I have identified the possibility to provide the alloy.theme parameter on the command line in runed.bat but I don't seam to get the hang of it.
Any help would be much appreciated.
Best regardsIt's very easy. Navigate to edesigner\jdk\jre\lib\ext. Copy alloy.jar, the jar file for the alloy look and feel into this folder. Also, add a jar file containing a text file alloy.properties. This properties file would look like the following:
alloy.theme=bedouin
alloy.isLookAndFeelFrameDecoration=true
change the alloy.theme property for your various environments.
And add a file called swing.properties under edesigner\jdk\jre\lib folder. the sample swing.properties would look like:
swing.installedlafs = motif,windows,metal,mac,alloy
swing.installedlaf.motif.name = CDE/Motif
swing.installedlaf.motif.class = com.sun.java.swing.plaf.motif.MotifLookAndFeel
swing.installedlaf.windows.name = Windows
swing.installedlaf.windows.class = com.sun.java.swing.plaf.windows.WindowsLookAndFeel
swing.installedlaf.metal.name = Metal
swing.installedlaf.metal.class = javax.swing.plaf.metal.MetalLookAndFeel
swing.installedlaf.mac.name = Mac
swing.installedlaf.mac.class = com.sun.java.swing.plaf.mac.MacLookAndFeel
swing.installedlaf.alloy.name = Alloy
swing.installedlaf.alloy.class = com.incors.plaf.alloy.AlloyLookAndFeel
swing.defaultlaf=com.incors.plaf.alloy.AlloyLookAndFeel
Start eDesigner to see the change....
Have fun....
Mac. -
Changes in Look & Feel in iSupport
Hi
Could you please provide any examples and guide on customising the iSupport page which includes text, font (look and feel) .
ThanksConsider using CardLayout (designed for this task) as the layout manger for your inner panel. You will then not need to use repaint(), validate() or revalidate().
-
How Do You Change the Look & Feel of a JFileChooser Dialog?
I set the L&F of my JFrame to the Metal L&F. I thought it would automatically change the L&F of the JFileChoosers I included in my program but my JFileChoosers still have the Windows L&F. How could I change the L&F of my JFileChoosers to correspond to the Metal L&F of my JFrame? Thank you in advance.
I set the L&F of my JramFe to the Mteal L&F. I tghouht it would aaltcutmaioly cahnge the L&F of the JroFeeClihoss I idenclud in my pgarorm but my JeFeorliCohss still hvae the Wwindos L&F. How cluod I canhge the L&F of my JhiFooCresles to cposrnroed to the Matel L&F of my JmFaer? Tnhak you in avdanec.
-
Packages to change Look&Feel,Icons etc.,how to use them?
I downloaded several free packages to change the Look&Feel of my Desktop
NHudDrive etc.,when I unzip I only see lots of Icons etc. supposed to
change the Desktop looks but no explanation how to do it.
Have anyone used them,and know how to do it?Instructions are here http://support.apple.com/kb/HT2493
Cheers, Tom -
Hi,
This is regarding to change the look & feel using jsp
i have create two .laf files (each contain differnt skin & skeleton)
in .jsp
a) how to show the look & feel names dynamically? (in dropdown)
b)when i select a particular look & feel, then that look & feel has to apply for the desktop.
how to achieve this. pls let me know.
Thanks,
Natesh.I guess the OAM is the Oracle Access Manager of oracle's fusion middleware? Also 'webgate plugin' and 'access servers' do point me that way.
This is the linux forum. You should ask your question probably in the identity management forum: Identity Manager -
Changing look & feel of Authentication Menu
Hello all,
I am wondering if anybody has tried to change the look & feel of the Authentication Menu modules.
The portal comes with the following as default
Authentication Description
LDAP LDAP Authentication
Membership Membership Authentication
XXX XXX Authentication
I'd like to delete the all the descriptions and change all the links from text to images, how would I do that?
I've tried to modify login_menu.html, login_menu_modules.html, had a look at amAuth.xml etc.. but couldn't solve the problem.
Anybody has done something similar please help.
Thanks & regards,
TimThanks for the reply, I've read your article at the following URL
http://softwareforum.sun.com/NASApp/jive/thread.jsp?forum=2&thread=14219&message=26399&q=416c6578#26399
I examined the membership.properties and understood about the mylogin.html that you mentioned in your article. However, this process occurs after the person clicks the option on the first screen. It's called Authenicator Menu which defined by <subst data="rows">No menu?</subst> in login_menu.html.
My question was/is how to change this first screen look & feel, basically split/delete text that generated by the portal?
I am also having another question, how do we put the "Content" "Layout" to the menubar.jsp?
Thanks & regards,
Tim -
Setting Portlet Preference in Backing File for Clipper Portlet
Hi All,
I have a clipper portlet, and I am setting the preferences(for form based authentication & passing application data dynamically) in the backing file which is then associated to the Clipper portlet. I looked up at the clipper constants that are available; and the example they have given is
portlet.setPreference(LOGIN_FORM_EXTRA_PARAMS, "name1=value2&name3=value4")
My question is what is this "portlet"?? is it an instance?? then whose instance/object it is?? how am I suppose to declare it in my Backing File??
Any input on this would be appreciated.
Thanks,
GHi,
I'm guessing here... but I think that the example is referring to a PortletPreferences object, which can be obtained through a PortletBackingContext with the getPortletPreferences() method. To obtain a PortletBackingContext you just use the static method PortletBackingContext.getPortletBackingContext() and pass in the request in the backing file. See also: Using the Preferences API to Access or Modify Preferences
Hope this helps,
Petri -
Experts,
How to Change Portal Look and Feel u2013 Branding. (Basic Knowledge of JSP and HTMLB required) ?...
Please provide me some link i will be thankful to you guys.
Thanks
Nityanand AryaHi
refer to the following links:
[MastHead Change & Portal Desktop|MastHead Change & Portal Desktop]
[Portal Customizations Intro - Login Part 1|MastHead Change & Portal Desktop]
[Portal Customizations Intro - Login Part 2|Portal Customizations Intro - Login Part 2]
[Portal Customizations Intro - Look&Feel Part 3|Portal Customizations Intro - Look&Feel Part 3]
For Portal Themes refer this[http://help.sap.com/saphelp_nw70/helpdata/en/f4/bb7a3b688d3c1de10000000a11402f/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/f4/bb7a3b688d3c1de10000000a11402f/frameset.htm]
Cheers
Chinmaya -
Ok, using Windows Look-feel ... any changes?
Hi:
I am presently using the Kunststoft theme. I want to the use the SUN supplied Windows Look-feel, but I cannot change the black background in my desktop application. I use JInternal frames but start with a desktop pane.
Does anyone know how to specifically change the black background over the "default" black background that the windows UI sets. I tried setBackground(new Color(255,0,0)); .. got red for a moment, then the screen changed to black.
Any help appreciated. I really like the Windows Look-feel, but a lighter background desktop area is preferred.
Thanks,
PiratePeteAfter you set the Windows L&F, you must set another property.
Here is an example:
//Set the system L&F
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
//Perhaps the system is windows, so you must do this if you want to see
//the mnemonics without pressint Alt key
WindowsLookAndFeel.setMnemonicHidden(false); -
How Can You Change the Look and Feel of Charts in OBIEE 11g
How Can You Change the Look and Feel of Charts in OBIEE 11g?
Edited by: user11973122 on Jul 18, 2012 12:13 AMCheck these files
OFM_HOME\Oracle_BI1\bifoundation\web\msgdb\s_blafp\viewui\chart\dvt-graph-skin.xml
OFM_HOME\Oracle_BI1\bifoundation\web\msgdb\views\dvtchart\obips.dvtchart.xml
OFM_HOME\Oracle_BI1\bifoundation\web\display\chartfontmapping.xml
Pls mark correct or helpful if helps -
Mysites 'change the look' back to default
Hi -
I recently attempted to change the look of mysites in our environment. This worked, however it removed the person image from the upper left hand corner. I would like to 'undo' this change, but can't seem to figure out how. I would like
mysites to be back to the original masterpage before I changed it.
Thanks,
Jesse
Jesse A. BrandenburgI will be safe and will select "Reset all pages in this site to site definition version"
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.
Maybe you are looking for
-
How to convert element to mesasge type variable in BPEL
Hi, I have xml message in element type variable. I want to create one variable of message type and have same elements values what element type variable has. I modified my xsd and created of same type like element namespace. Now when i use assign acti
-
How can I operate Reader X in "Kiosk" mode?
What I need to do: Open a single document via a command line reference and "lock" Reader from being able to go anywhere else. Initially opening the document is easy enough...just supply the complete pathname to the file on the command line. I will
-
Want to delete Rows from SAP Query which have u20180u2019 or blank values
Hi Experts, I have made one sap-query, in that I have added some additional fields, after that I am getting some blank or u20180u2019 values in some rows, can anyone tell me how to delete those rows which have u20180u2019 or blank values. Regards Ma
-
Where is facetime icon in iPhone5
Can someone advise why I can not find the facetime icon? I do have facetime setted up from "setting". Thanks
-
On the new version of iTunes the shuffle button and replay buttons appear to have disappeared on the genius tab and am always having to listen to shuffled songs now :( how can I stop this?