Re: List spaces for user in velocity macro
David Taylor <[email protected]> Wed, 10 Jul 2013 08:51:35 -0700
| Newsgroups | gmane.comp.jakarta.jetspeed.user |
|---|---|
| Message-ID | <CAM4V2B5ZsBv8YrOi+8o5qbrsYNhguuASvq2hyVbsGOzhTLsZRQ@mail.gmail.com> |
There are Javadocs online for all the Jetspeed API:
Spaces:
http://portals.apache.org/jetspeed-2/apidocs/org/apache/jetspeed/spaces/Spaces.html
Page Manager (folders):
http://portals.apache.org/jetspeed-2/apidocs/org/apache/jetspeed/page/PageManager.html
There are examples of using these APIs in the J2-Admin application. For
example, the Spaces Manager is actually a portlet, not a layout:
http://www.jarvana.com/jarvana/view/org/apache/portals/jetspeed-2/j2-admin/2.2.2/j2-admin-2.2.2.war!/WEB-INF/view/spaces/spaces-manager.jsp?format=ok
Portlet Applications can make use of Jetspeed API services by declaring the
services they want to use in the jetspeed-portlet.xml deployment descriptor
<js:services>
<js:service name='PageManager' />
<js:service name='SpacesService' />
Then, in your portlet's init method, the portlet context provides access to
all of your declared services:
(from org.apache.jetspeed.portlets.spaces.SpacesList portlet in j2-admin
app):
public void init(PortletConfig config) throws PortletException
{
super.init(config);
PortletContext context = getPortletContext();
spacesService = (Spaces)
context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
This is how the Space Manager was implemented in Jetspeed 2.2.1. If you
are more interested in developing your header with velocity templates and
layouts, let me know, I can give examples of that approach too
On Wed, Jul 10, 2013 at 6:36 AM, Jiri De Jagere <[email protected]> wrote:
> Hi,
>
>
> I'm developing my own header and footer for a Jetspeed-based application.
> I've found the API calls to list the pages for a particular view, but I
> can't find how to list the available folders and links (spaces).
>
> Could someone please point me in the right direction?
>
>
> Thanks!
>
>
> Jiri
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
David