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 Sun, 10 Sep 2006 21:45:33 GMT
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


Mime
View raw message