Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Setting component skin at runtime in code??
dolly1
Hi,
We can define multiple skins for a component of which one is default. I was looking for a way if possible one particular skin can be set for a component dropped on a page in JAVA code.
For example: Here is a use case I can think of:
1. I create a component with multiple skins.
2. Saved and dropped it to a page
3. Page has a pre controller
4. While rendering the page when pre controller executes, based on some business logic say I need to show a particular skin.
I did check the RenderingManager and all other related classes but did not find a way to do that.
TS 7.2
LS 7.2
on LInux
Find more posts tagged with
Comments
dolly1
Any takers for this? Alex, Viral??
At least how it works? In BaseRequestContext i can see that componentId, endUserSite is getting set but where is skin getting set?
Migrateduser
Hi Dolly,
You can change skins within a component external by add the following line:
context.getPageScopeData().put("component_custom_skin", );
~ Prashant
AlexC
context.getPageScopeData().put(RuntimePage.PAGESCOPE_CUSTOM_SKIN, "[your skin name]");