I have tried to figure out how to create CMS Portlet that actually shows different startpage from default one.
I noticed that somebody has implemented indexpage as init-param while it should be implemented as preferences instead. Init parameters are common to all instances of same portlet. So If you want to create instance with other starting page, you need to create another portlet from same class. However if you implement starting page with preferences, one portlet is enough because preferences are per instance. Here is what is currently in portlet definition: | <portlet> | <portlet-name>CMSPortlet</portlet-name> | <portlet-class>org.jboss.portal.core.portlet.cms.CMSPortlet</portlet-class> | <init-param> | <description>Default path to index page.</description> | <name>indexpage</name> | <value>/default/index.html</value> | </init-param> | <supports> | <mime-type>text/html</mime-type> | <portlet-mode>VIEW</portlet-mode> | </supports> | <supported-locale>en</supported-locale> | <supported-locale>fr</supported-locale> | <supported-locale>es</supported-locale> | <resource-bundle>Resource</resource-bundle> | <portlet-info> | <title>CMS</title> | </portlet-info> | </portlet> | And it should be something like this: | <portlet> | <portlet-name>CMSPortlet</portlet-name> | <portlet-class>org.jboss.portal.core.portlet.cms.CMSPortlet</portlet-class> | <supports> | <mime-type>text/html</mime-type> | <portlet-mode>VIEW</portlet-mode> | </supports> | <supported-locale>en</supported-locale> | <supported-locale>fr</supported-locale> | <supported-locale>es</supported-locale> | <resource-bundle>Resource</resource-bundle> | <portlet-info> | <title>CMS</title> | </portlet-info> | <portlet-preferences> | <preference> | <name>indexpage</name> | <value>/default/index.html</value> | </preference> | </portlet-preferences> | </portlet> | | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930707#3930707 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930707 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user