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 <[EMAIL PROTECTED]>:
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to