-
1. Re: Deploy new portal using existing portlets
peterj Feb 10, 2007 11:27 PM (in response to mlipp)In the portlet-instances.xml file, you should be able to reference existing portlets using the full portlet name, which is typically local.appname.portletname. For example, for the CMS portlet, the name is local.portal.CMSPortlet. You can easily find full portlet names in the Management Portlet, click on the Portlets link at the top.
But beware, the Portal will not read the portlet-instances.xml file unless you define a portlet in your war file. Also, there is a possible issue if the Portal loads your war file before the war file containing the portlet you are referencing. See the discussion at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=100332 -
2. Re: Deploy new portal using existing portlets
mlipp Feb 11, 2007 5:52 AM (in response to mlipp)Thanks Peter. You write "you should be able to reference existing portlets ...", well, I tried this already, but all I get is
Failed to create instance WfDemoPortalIntroInstance of portlet /de.danet.an.jbportal.war.local.portal.CMSPortlet because portlet /de.danet.an.jbportal.war.local.portal.CMSPortlet is not available
so the portal effectively prepends the name of the WAR with the portal definition (de.danet.an.jbportal.war) to the full portlet name. It does not recognize this as a "fully qualified" (not-to-be-modified) portlet name.
Maybe I'll head for the programmatic approach described in the referenced thread. -
3. Re: Deploy new portal using existing portlets
dleerob Feb 12, 2007 2:09 AM (in response to mlipp)I created a new instance of CMSPortlet through the actual portal by going to the Management Portlet, clicking on "portlets", selecting "local.portal.CMSAdminPortlet", then on the right entering in a new name, and clicking "Create instance". If you now click on "Instances" under the Management Portlet, your new instance should be there. You can edit the indexpage value from there to point to the new contents index page that you should create under the CMS Admin. I basically created a [mycompanyname] folder at the same level as the default folder, stuck an index.html file in there and created whatever contents I wanted, and then pointed my new instance indexpage value to that directory/file. Now you can add your new instance to whatever pages you want and give the required securities via the Management Portal "Portal" link.
Hope this help you a bit. -
4. Re: Deploy new portal using existing portlets
peterj Feb 12, 2007 5:44 PM (in response to mlipp)I went back and looked at what I did earlier, and it turns out I gave you bad information because I remembered it wrong. Do this instead.
First, in portlet.xml, create a new portlet using the CSM portlet class, like this:<portlet> <portlet-name>NewCmsPortlet</portlet-name> <portlet-class>org.jboss.portal.core.portlet.cms.CMSPortlet</portlet-class> . . . <portlet>
Then in the portlet-instances.xml file, refer use NewCmsPortlet as the portlet name.
Not quit the same as creating new instances of an existing protlet, but close enough.