portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Mark Donaghy" <philip.dona...@gmail.com>
Subject Re: How I can get access to PSML in a Portlet?
Date Tue, 12 Sep 2006 22:43:44 GMT
Hi Michael,

The jetspeed-portlet.xml is reserved for jetspeed specific
configurations. If you want your portlet to be pure jsr-168 then don't
use jetspeed-portlet.xml .

Although if your portlet will be running only on jetspeed then using
jetspeed-portlet.xml will give you access to portal services. For
example the UserManager or PageManager services are accessed this way
from the j2-admin portlets.

Philip

On 9/12/06, Michael Boss <baron.muenhausen@googlemail.com> wrote:
> Hi Philip,
>
> Where a difference between portlet.xml and jetspeed-portlet.xml?
> Can I add it so in portlet.xml ?
>
> Thank you
> Michael
>
> 2006/9/10, Philip Mark Donaghy <philip.donaghy@gmail.com>:
> > Hi Michael,
> >
> > Try accessing the page manager with something like this,
> >
> >        PortletContext context = getPortletContext();
> >        pageManager =
> > (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
> >
> > I believe that you have to define a Jetspeed Service in a
> > jetspeed-portlet.xml for this to work.
> >
> >        <js:services>
> >            <js:service name='PageManager'/>
> >        </js:services>
> >
> > Philip
> >
> > On 9/10/06, Michael Boss <baron.muenhausen@googlemail.com> wrote:
> > > Hi All,
> > >
> > > I develop administrative Portlet. I wish to add and delete data from
> > > PSML. How I can get access to PSML in a Portlet?
> > > I have tried so:
> > >
> > > PageManager pm;
> > > Page p;
> > > Fragment f;
> > >
> > > try {
> > > p = pm.getPage("/Public/test.psml");
> > > f = p.getFragmentById("P-10001");
> > > System.out.println("Fragment name: "+f.getName());
> > > }
> > > catch (PageNotFoundException e) {
> > >   System.out.println("ppp: No page found");
> > > }
> > > catch (NodeException e) {
> > >   System.out.println("ppp: Node error");
> > > }
> > >
> > > But I receive a NullPointerException.
> > >
> > > Many Thanks
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> > > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> > >
> > >
> >
> >
> > --
> > Philip Donaghy
> > donaghy.blogspot.com del.icio.us/donaghy/philip
> > Skype: philipmarkdonaghy
> > Office: +33 5 56 60 88 02
> > Mobile: +33 6 20 83 22 62
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>


-- 
Philip Donaghy
donaghy.blogspot.com del.icio.us/donaghy/philip
Skype: philipmarkdonaghy
Office: +33 5 56 60 88 02
Mobile: +33 6 20 83 22 62

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message