is there some way how to configure portlet decoration in pages.xml file?
I don't see the option at schema: http://www.gatein.org/xml/ns/gatein_objects_1_0
Thanks a lot, Michal Vanco
Yes, you can add some tags :
as childs of tag <portlet-application> in pages.xml file to config portlet as you want. You can look at an example in GateIn : $GateIn/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/pages.xml
Notice that our HomePagePortlet is configured in this file so that it doesn't have any decoration !
thanks for your reply but that's not what I'm looking for.
We have created new "Decoration themes" and we want to configure the theme for some specific portlet.
I know that there is a way how to set default decoration theme for skin so that it's used for all portlets after skin change.
But what if we need to set other theme for just one portlet?
That's something what is not present at current schema.
There is no way to configure the theme from .xml for the moment.
GateIn uses JIBX to convert XML into Java Object, the element <portlet-application> in pages.xml is converted into instance of class org.exoplatform.portal.config.model.Application. The JIBX configuration applied to component of UIFramework is component/portal/src/main/resources/binding.xml
From this mapping element, we see that the binding of 'theme' field is missing. So there is no way to configure theme from XML
By the way, we could customize the theme via UI
Thanks for the mapping information!
I think that some users would appreciate this option as well. I'm about to create a feature request in Jira, do you agree?
In case you are using extension and you have whole portal configuration there...you want everything after first deploy and not after manual change in UI
My last conclusion was wrong, so sorry!
Although the theme binding is missing in binding.xml, the work is still done by org.exoplatform.portal.config.serialize.PortletApplicationHandler, a handler invoked during unmarshalling.
String theme = nextOptionalTag(ctx, "theme");
String title = nextOptionalTag(ctx, "title");
String accessPermissions = nextOptionalTag(ctx, "access-permissions");
boolean showInfoBar = nextOptionalBooleanTag(ctx, "show-info-bar", true);
The code snippet shows us that configuration for theme is possible
It really works, thanks!!!
But there was a bit difficult way how to set it properly (no documentation, no example...I had to go through these files: PortletApplicationHandler, /groovy/portal/webui/application/UIPortlet.gtmpl, UIPortlet to find correct structure of theme property)
To share these findings, portlet definition in pages.xml should look like:
It definitely needs to be documented and it would be nice if it is also present at 1_1 schema (as well as icon definition).