Custom JS and CSS for portlet
abdulbasitmughal Aug 16, 2013 8:31 AMI want to change the display of content in portlet through custom CSS and JQuery in portlet pages using GateIn 3.6. I have tried two ways to achive this
1st: I have tried the help avaiable at https://community.jboss.org/wiki/JQueryPortlet/diff but getting this message in eclipse
It ask to configure build path but here i dont know what it should be?
2nd: I have tried the help available at https://docs.jboss.org/author/display/GTNPORTAL36/Custom+Skin+for+a+Portlet and changed my gatein-resources file and placed js and css files in specific folders
<gatein-resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_3 http://www.gatein.org/xml/ns/gatein_resources_1_3"
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_3">
<!-- GateIn will load this CSS for HomePagePortlet instead of the default one. -->
<portlet-skin>
<!--
The name of the web application containing the portlet.xml file in which
BannerPortlet is definded. The application name is usually the same as
the name of the WAR through which the application was deployed.
-->
<application-name>simplest-hello-world-portlet</application-name>
<!-- <portlet-name> value from the portlet.xml referenced above -->
<portlet-name>SimplestHelloWorldPortlet</portlet-name>
<skin-name>Default</skin-name>
<css-path>WEB-INF/css/style.default.css</css-path>
</portlet-skin>
<portlet>
<name>simplest-hello-world-portlet</name>
<scripts>
<script>
<path>/jquery.js</path>
</script>
</scripts>
</portlet>
</gatein-resources>
But found exceptions
12:50:14,095 INFO [org.gatein.integration.jboss.as7.deployment.PortletBridgeDependencyProcessor] (MSC service thread 1-6) Adding JBoss Portlet Bridge 3.2.1.Final to "simplest-hello-world-portlet.war"
12:50:14,114 ERROR [org.exoplatform.web.application.javascript.JavascriptConfigDeployer] (MSC service thread 1-1) An error occurs while registering 'Javascript in gatein-resources.xml' from the context 'null': java.lang.IllegalArgumentException: The context name cannot be null
at org.exoplatform.container.definition.PortalContainerConfig.getPortalContainerNames(PortalContainerConfig.java:502) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
at org.exoplatform.container.PortalContainer.addInitTask(PortalContainer.java:474) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
...
12:50:14,123 ERROR [org.exoplatform.portal.resource.GateInSkinConfigDeployer] (MSC service thread 1-1) An error occurs while registering '/WEB-INF/gatein-resources.xml' from the context 'null': java.lang.IllegalArgumentException: The context name cannot be null
at org.exoplatform.container.definition.PortalContainerConfig.getPortalContainerNames(PortalContainerConfig.java:502) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
at org.exoplatform.container.PortalContainer.addInitTask(PortalContainer.java:474) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
at org.exoplatform.portal.resource.GateInSkinConfigDeployer.onEvent(GateInSkinConfigDeployer.java:83) [exo.portal.component.web.resources-3.6.0.Final.jar:3.6.0.Final]
...
Please guide me what it should be, is it a correct way or is there any other way to achive this functionality?
Thanks in advance for your cooperation in this regard.