You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Jonathan Hawkins <jo...@Cedar.com> on 2004/10/05 15:57:46 UTC

List of user's portlets

I want to get a list of the portlets by name or id that are in the users
profile, not a list of available portlets but only those that are currently
configured in the portal for that user.

Any assistance appreciated.



This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. Any unauthorised distribution or 
copying is strictly prohibited. Whilst Cedar Software Ltd 
takes steps to prevent the transmission of viruses via e-mail, 
we cannot guarantee that any email or attachment is free from 
computer viruses and you are strongly advised to undertake your 
own anti-virus precautions. Cedar Software Ltd grants no 
warranties regarding performance, use or quality of any e-mail 
or attachment and undertakes no liability for loss or damage, 
howsoever caused.  


For more information on Cedar Software and our products, 
please visit our web site at http://www.cedar.com/Home.asp


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


Re: List of user's portlets

Posted by David Sean Taylor <da...@bluesunrise.com>.
jonathan.hawkins@hawkinsweb.co.uk wrote:

> David,
> 
> Tried your code but kept getting nullpointerexceptions on
> 
> Portlets portlets = profile.getDocument().getPortlets();
>
What is null, the document set or the profile?

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


Re: List of user's portlets

Posted by jo...@hawkinsweb.co.uk.
David,

Tried your code but kept getting nullpointerexceptions on

Portlets portlets = profile.getDocument().getPortlets();

I'm attempting to write a jsp whereby a drop down list is presented to the
user populated with portlets that they can then change the source URL of.
Bit like a favourites page.

Jetspeed is proving to try it's best to stop me from achieving this, well
probably more like my inability to follow the way thruogh the code !!!

Any further assistance appreciated.

Jon Hawkins


> Jonathan Hawkins wrote:
>
>>
>> I want to get a list of the portlets by name or id that are in the
>> users profile, not a list of available portlets but only those that
>> are currently configured in the portal for that user.
>>
>> Any assistance appreciated.
>
> Try somethin like this:
>
>     public void doPerform(RunData data) throws Exception
>     {
>         Profile profile = ((JetspeedRunData)
>         data).getCustomizedProfile(); Portlets portlets =
>         profile.getDocument().getPortlets();
>         if (portlets == null)
>         {
>             return;
>         }
>         int count = 0;
>         count = traverse(portlets, count);
>         super.doPerform(data);
>
>     }
>
>     private int traverse(Portlets portlets, int count)
>     {
>         // First let's add all the Entries in the current level
>         Iterator eItr = portlets.getEntriesIterator();
>         while(eItr.hasNext())
>         {
>             Entry entry =  (Entry)eItr.next();
>
>             Portlet portlet = null;
>             try
>             {
>                 portlet = PortletFactory.getPortlet(entry);
>             }
>             catch (Exception e)
>             {
>                 log.error("Could not create portlet for entry " +
> entry.getId(), e);
>                 continue;
>             }
>             if (portlet == null)
>             {
>                 log.error("Could not create portlet for entry " +
> entry.getId());
>                 continue;
>             }
> 	}
>         //Now if there are child levels, drill down recursively
>         if(portlets.getPortletsCount() > 0)
>         {
>             Iterator pItr = portlets.getPortletsIterator();
>             while(pItr.hasNext())
>             {
>                 Portlets childPortlets = (Portlets)pItr.next();
>                 count += traverse(childPortlets, count);
>             }
>         }
>         return count;
>     }
>
> --
> David Sean Taylor
> Bluesunrise Software
> david@bluesunrise.com
> [office] +01 707 773 4646
> [mobile] +01 707 529 9194
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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


RE: Changing Default Customize page

Posted by jo...@hawkinsweb.co.uk.
My portlet is defined with the following xreg snippet :-

<classname>org.apache.jetspeed.portal.portlets.JspPortlet</classname>
        <parameter name="_showtitlebar" value="true" hidden="false"
cachedOnName="true" cachedOnValue="true"/>
        <parameter name="template" value="CedArLinks.jsp" hidden="true"
cachedOnName="true" cachedOnValue="true"/>
        <parameter name="action"
value="portlets.CedArLinks.CedArLinksPortlet" hidden="true"
cachedOnName="true" cachedOnValue="true"/>

My action class did not have a buildConfigureContext method originally and
so my portlet used customizer-portlet.vm by default.

Now that I have a buildConfigureContext method the template named in the
setTemplate call appears to be presumed to be a jsp even if I specifically
state myCustomizePage.vm.

I am assuming that there must be a way of using a vm customize page with a
jsp portlet as that is the default behaviour.

I presume I can still use a jsp page and be able to utilise the default
customise action as specified in the default vm page ?

Thanks

Jon
> I don't think you can mix and match, is your normal portlet a JSP or VM
> ?
>
> If it's a JSP, you will need to use a JSP customizer (we initially
> tried mixing them, but were unable to get that to work)
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 10:12 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> What is happaening is that when buildConfigureContext is called it is
> trying to set the template to CedArFavourites.jsp. My portlet action
> class extends JspPortletAction, without the new buildConfigureContext
> it sets the template to a vm, with the new method it tries to load a
> jsp !!
>
> Any ideas.
>
> Thanks very much for your assistance
>
> Jon Hawkins
>
>
>> What class did you extend in your action class.   The velocity action
>> class should look like:
>>    protected void buildConfigureContext( VelocityPortlet portlet,
>>                                          Context context,
>>                                          RunData rundata )
>>    {
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 9:13 AM
>> To: jetspeed-user@jakarta.apache.org
>> Subject: RE: Changing Default Customize page
>>
>> I have added <parameter name="provides.customization" value="true"
>> hidden="true"/> top my portlet and have put the following in my action
>> class
>>
>> protected void buildConfigureContext(Portlet portlet, Context context,
>> RunData rundata) throws Exception
>> 	{
>>    	setTemplate(rundata, "CedArFavourites.vm");
>> 	}
>>
>> When I debug this in eclipse, buildNormalContext gets called but
>> buildConfigureContext doesn't !!
>>
>> Any further assistance appreciated
>>
>>
>>
>>> The action class takes care of that per my first response to your
>>> question. If you do not tell Jetspeed that you action class provides
>>> it's own customization, it uses the default.
>>>
>>> The setTemplate method tells the action class to display that
>>> customizer vm file, versus the default.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>> Sent: Thursday, October 07, 2004 8:50 AM
>>> To: jetspeed-user@jakarta.apache.org
>>> Subject: RE: Changing Default Customize page
>>>
>>> Let me get this right...........hopefully.
>>>
>>> The user hits the customize button in the top right of the portlet
>>> and I want my customize page displayed. So how do I tell the portlet
>>> that it must use my customize portlet and not the default.
>>>
>>>>>From what you have said I would need to write an action class with a
>>> buildConfigureContext method, and myCustomizationPage.vm can just use
>>> the default customize action.
>>>
>>> Apologies if appearing dense !!!
>>>
>>> Jon Hawkins
>>>
>>>
>>>
>>>
>>>
>>>> That is done in the action class... In the action class, you
>>>> implement the buildConfigureContext method, and invoke the
>>>> setTemplate method.
>>>>
>>>> Eg.
>>>> setTemplate(rundata, "myCustomizationPage.vm");
>>>>
>>>> -----Original Message-----
>>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>>> Sent: Thursday, October 07, 2004 8:32 AM
>>>> To: jetspeed-user@jakarta.apache.org;
>>>> jetspeed-user@jakarta.apache.org Subject: RE: Changing Default
>>>> Customize page
>>>>
>>>> Thanks for the quick reply, but how do I tell my portlet to use
>>>> myCustomizationPage.vm and not the default ?
>>>>
>>>> Thanks
>>>>
>>>> Jon Hawkins
>>>>
>>>>
>>>>> Either add a parameter in your portlet definition in the xreg:
>>>>>
>>>>>        <parameter name="provides.customization" value="true"
>>>>> hidden="true"/>
>>>>>
>>>>> or (read this works but haven't tried it) create a
>>>>> providesCustomization
>>>>> which returns true in your action class.
>>>>>
>>>>> We have found an issue however, see
>>>>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>>>>
>>>>> -Art
>>>>>
>>>>> -----Original Message-----
>>>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>>>> Sent: Thursday, October 07, 2004 8:15 AM
>>>>> To: jetspeed-user@jakarta.apache.org
>>>>> Subject: Changing Default Customize page
>>>>>
>>>>> I want to change the customize page of my portlet from using the
>>>>> default cutomize page to my own customize page but still using the
>>>>> default customize action. I am using VM.
>>>>>
>>>>> Any assistance would be appreciated.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
>>>>> jetspeed-user-unsubscribe@jakarta.apache.org For additional
>>>>> commands, e-mail:
>>>>> jetspeed-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
>>>>> jetspeed-user-unsubscribe@jakarta.apache.org For additional
>>>>> commands, e-mail:
>>>>> jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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


RE: Changing Default Customize page

Posted by Arthur D'Alessandro III <ar...@artd3.com>.
I don't think you can mix and match, is your normal portlet a JSP or VM ?

If it's a JSP, you will need to use a JSP customizer (we initially tried
mixing them, but were unable to get that to work) 

-----Original Message-----
From: jonathan.hawkins@hawkinsweb.co.uk
[mailto:jonathan.hawkins@hawkinsweb.co.uk] 
Sent: Thursday, October 07, 2004 10:12 AM
To: jetspeed-user@jakarta.apache.org
Subject: RE: Changing Default Customize page

What is happaening is that when buildConfigureContext is called it is
trying to set the template to CedArFavourites.jsp. My portlet action class
extends JspPortletAction, without the new buildConfigureContext it sets the
template to a vm, with the new method it tries to load a jsp !!

Any ideas.

Thanks very much for your assistance

Jon Hawkins


> What class did you extend in your action class.   The velocity action
> class should look like:
>    protected void buildConfigureContext( VelocityPortlet portlet,
>                                          Context context,
>                                          RunData rundata )
>    {
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 9:13 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> I have added <parameter name="provides.customization" value="true"
> hidden="true"/> top my portlet and have put the following in my action
> class
>
> protected void buildConfigureContext(Portlet portlet, Context context,
> RunData rundata) throws Exception
> 	{
>    	setTemplate(rundata, "CedArFavourites.vm");
> 	}
>
> When I debug this in eclipse, buildNormalContext gets called but
> buildConfigureContext doesn't !!
>
> Any further assistance appreciated
>
>
>
>> The action class takes care of that per my first response to your
>> question. If you do not tell Jetspeed that you action class provides
>> it's own customization, it uses the default.
>>
>> The setTemplate method tells the action class to display that
>> customizer vm file, versus the default.
>>
>>
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 8:50 AM
>> To: jetspeed-user@jakarta.apache.org
>> Subject: RE: Changing Default Customize page
>>
>> Let me get this right...........hopefully.
>>
>> The user hits the customize button in the top right of the portlet and
>> I want my customize page displayed. So how do I tell the portlet that
>> it must use my customize portlet and not the default.
>>
>>>>From what you have said I would need to write an action class with a
>> buildConfigureContext method, and myCustomizationPage.vm can just use
>> the default customize action.
>>
>> Apologies if appearing dense !!!
>>
>> Jon Hawkins
>>
>>
>>
>>
>>
>>> That is done in the action class... In the action class, you
>>> implement the buildConfigureContext method, and invoke the
>>> setTemplate method.
>>>
>>> Eg.
>>> setTemplate(rundata, "myCustomizationPage.vm");
>>>
>>> -----Original Message-----
>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>> Sent: Thursday, October 07, 2004 8:32 AM
>>> To: jetspeed-user@jakarta.apache.org;
>>> jetspeed-user@jakarta.apache.org Subject: RE: Changing Default
>>> Customize page
>>>
>>> Thanks for the quick reply, but how do I tell my portlet to use
>>> myCustomizationPage.vm and not the default ?
>>>
>>> Thanks
>>>
>>> Jon Hawkins
>>>
>>>
>>>> Either add a parameter in your portlet definition in the xreg:
>>>>
>>>>        <parameter name="provides.customization" value="true"
>>>> hidden="true"/>
>>>>
>>>> or (read this works but haven't tried it) create a
>>>> providesCustomization
>>>> which returns true in your action class.
>>>>
>>>> We have found an issue however, see
>>>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>>>
>>>> -Art
>>>>
>>>> -----Original Message-----
>>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>>> Sent: Thursday, October 07, 2004 8:15 AM
>>>> To: jetspeed-user@jakarta.apache.org
>>>> Subject: Changing Default Customize page
>>>>
>>>> I want to change the customize page of my portlet from using the
>>>> default cutomize page to my own customize page but still using the
>>>> default customize action. I am using VM.
>>>>
>>>> Any assistance would be appreciated.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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



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


RE: Changing Default Customize page

Posted by jo...@hawkinsweb.co.uk.
What is happaening is that when buildConfigureContext is called it is
trying to set the template to CedArFavourites.jsp. My portlet action class
extends JspPortletAction, without the new buildConfigureContext it sets the
template to a vm, with the new method it tries to load a jsp !!

Any ideas.

Thanks very much for your assistance

Jon Hawkins


> What class did you extend in your action class.   The velocity action
> class should look like:
>    protected void buildConfigureContext( VelocityPortlet portlet,
>                                          Context context,
>                                          RunData rundata )
>    {
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 9:13 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> I have added <parameter name="provides.customization" value="true"
> hidden="true"/> top my portlet and have put the following in my action
> class
>
> protected void buildConfigureContext(Portlet portlet, Context context,
> RunData rundata) throws Exception
> 	{
>    	setTemplate(rundata, "CedArFavourites.vm");
> 	}
>
> When I debug this in eclipse, buildNormalContext gets called but
> buildConfigureContext doesn't !!
>
> Any further assistance appreciated
>
>
>
>> The action class takes care of that per my first response to your
>> question. If you do not tell Jetspeed that you action class provides
>> it's own customization, it uses the default.
>>
>> The setTemplate method tells the action class to display that
>> customizer vm file, versus the default.
>>
>>
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 8:50 AM
>> To: jetspeed-user@jakarta.apache.org
>> Subject: RE: Changing Default Customize page
>>
>> Let me get this right...........hopefully.
>>
>> The user hits the customize button in the top right of the portlet and
>> I want my customize page displayed. So how do I tell the portlet that
>> it must use my customize portlet and not the default.
>>
>>>>From what you have said I would need to write an action class with a
>> buildConfigureContext method, and myCustomizationPage.vm can just use
>> the default customize action.
>>
>> Apologies if appearing dense !!!
>>
>> Jon Hawkins
>>
>>
>>
>>
>>
>>> That is done in the action class... In the action class, you
>>> implement the buildConfigureContext method, and invoke the
>>> setTemplate method.
>>>
>>> Eg.
>>> setTemplate(rundata, "myCustomizationPage.vm");
>>>
>>> -----Original Message-----
>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>> Sent: Thursday, October 07, 2004 8:32 AM
>>> To: jetspeed-user@jakarta.apache.org;
>>> jetspeed-user@jakarta.apache.org Subject: RE: Changing Default
>>> Customize page
>>>
>>> Thanks for the quick reply, but how do I tell my portlet to use
>>> myCustomizationPage.vm and not the default ?
>>>
>>> Thanks
>>>
>>> Jon Hawkins
>>>
>>>
>>>> Either add a parameter in your portlet definition in the xreg:
>>>>
>>>>        <parameter name="provides.customization" value="true"
>>>> hidden="true"/>
>>>>
>>>> or (read this works but haven't tried it) create a
>>>> providesCustomization
>>>> which returns true in your action class.
>>>>
>>>> We have found an issue however, see
>>>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>>>
>>>> -Art
>>>>
>>>> -----Original Message-----
>>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>>> Sent: Thursday, October 07, 2004 8:15 AM
>>>> To: jetspeed-user@jakarta.apache.org
>>>> Subject: Changing Default Customize page
>>>>
>>>> I want to change the customize page of my portlet from using the
>>>> default cutomize page to my own customize page but still using the
>>>> default customize action. I am using VM.
>>>>
>>>> Any assistance would be appreciated.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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


RE: Changing Default Customize page

Posted by Arthur D'Alessandro III <ar...@artd3.com>.
What class did you extend in your action class.   The velocity action class
should look like:
    protected void buildConfigureContext( VelocityPortlet portlet,
                                          Context context,
                                          RunData rundata )
    {

-----Original Message-----
From: jonathan.hawkins@hawkinsweb.co.uk
[mailto:jonathan.hawkins@hawkinsweb.co.uk] 
Sent: Thursday, October 07, 2004 9:13 AM
To: jetspeed-user@jakarta.apache.org
Subject: RE: Changing Default Customize page

I have added <parameter name="provides.customization" value="true"
hidden="true"/> top my portlet and have put the following in my action class

protected void buildConfigureContext(Portlet portlet, Context context,
RunData rundata) throws Exception
	{
    	setTemplate(rundata, "CedArFavourites.vm");
	}

When I debug this in eclipse, buildNormalContext gets called but
buildConfigureContext doesn't !!

Any further assistance appreciated



> The action class takes care of that per my first response to your
> question. If you do not tell Jetspeed that you action class provides
> it's own customization, it uses the default.
>
> The setTemplate method tells the action class to display that
> customizer vm file, versus the default.
>
>
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 8:50 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> Let me get this right...........hopefully.
>
> The user hits the customize button in the top right of the portlet and
> I want my customize page displayed. So how do I tell the portlet that
> it must use my customize portlet and not the default.
>
>>>From what you have said I would need to write an action class with a
> buildConfigureContext method, and myCustomizationPage.vm can just use
> the default customize action.
>
> Apologies if appearing dense !!!
>
> Jon Hawkins
>
>
>
>
>
>> That is done in the action class... In the action class, you implement
>> the buildConfigureContext method, and invoke the setTemplate method.
>>
>> Eg.
>> setTemplate(rundata, "myCustomizationPage.vm");
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 8:32 AM
>> To: jetspeed-user@jakarta.apache.org; jetspeed-user@jakarta.apache.org
>> Subject: RE: Changing Default Customize page
>>
>> Thanks for the quick reply, but how do I tell my portlet to use
>> myCustomizationPage.vm and not the default ?
>>
>> Thanks
>>
>> Jon Hawkins
>>
>>
>>> Either add a parameter in your portlet definition in the xreg:
>>>
>>>        <parameter name="provides.customization" value="true"
>>> hidden="true"/>
>>>
>>> or (read this works but haven't tried it) create a
>>> providesCustomization
>>> which returns true in your action class.
>>>
>>> We have found an issue however, see
>>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>>
>>> -Art
>>>
>>> -----Original Message-----
>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>> Sent: Thursday, October 07, 2004 8:15 AM
>>> To: jetspeed-user@jakarta.apache.org
>>> Subject: Changing Default Customize page
>>>
>>> I want to change the customize page of my portlet from using the
>>> default cutomize page to my own customize page but still using the
>>> default customize action. I am using VM.
>>>
>>> Any assistance would be appreciated.
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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



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


RE: Changing Default Customize page

Posted by jo...@hawkinsweb.co.uk.
I have added <parameter name="provides.customization" value="true"
hidden="true"/> top my portlet and have put the following in my action class

protected void buildConfigureContext(Portlet portlet, Context context,
RunData rundata) throws Exception
	{
    	setTemplate(rundata, "CedArFavourites.vm");
	}

When I debug this in eclipse, buildNormalContext gets called but
buildConfigureContext doesn't !!

Any further assistance appreciated



> The action class takes care of that per my first response to your
> question. If you do not tell Jetspeed that you action class provides
> it's own customization, it uses the default.
>
> The setTemplate method tells the action class to display that
> customizer vm file, versus the default.
>
>
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 8:50 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> Let me get this right...........hopefully.
>
> The user hits the customize button in the top right of the portlet and
> I want my customize page displayed. So how do I tell the portlet that
> it must use my customize portlet and not the default.
>
>>>From what you have said I would need to write an action class with a
> buildConfigureContext method, and myCustomizationPage.vm can just use
> the default customize action.
>
> Apologies if appearing dense !!!
>
> Jon Hawkins
>
>
>
>
>
>> That is done in the action class... In the action class, you implement
>> the buildConfigureContext method, and invoke the setTemplate method.
>>
>> Eg.
>> setTemplate(rundata, "myCustomizationPage.vm");
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 8:32 AM
>> To: jetspeed-user@jakarta.apache.org; jetspeed-user@jakarta.apache.org
>> Subject: RE: Changing Default Customize page
>>
>> Thanks for the quick reply, but how do I tell my portlet to use
>> myCustomizationPage.vm and not the default ?
>>
>> Thanks
>>
>> Jon Hawkins
>>
>>
>>> Either add a parameter in your portlet definition in the xreg:
>>>
>>>        <parameter name="provides.customization" value="true"
>>> hidden="true"/>
>>>
>>> or (read this works but haven't tried it) create a
>>> providesCustomization
>>> which returns true in your action class.
>>>
>>> We have found an issue however, see
>>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>>
>>> -Art
>>>
>>> -----Original Message-----
>>> From: jonathan.hawkins@hawkinsweb.co.uk
>>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>>> Sent: Thursday, October 07, 2004 8:15 AM
>>> To: jetspeed-user@jakarta.apache.org
>>> Subject: Changing Default Customize page
>>>
>>> I want to change the customize page of my portlet from using the
>>> default cutomize page to my own customize page but still using the
>>> default customize action. I am using VM.
>>>
>>> Any assistance would be appreciated.
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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


RE: Changing Default Customize page

Posted by Arthur D'Alessandro III <ar...@artd3.com>.
The action class takes care of that per my first response to your question.
If you do not tell Jetspeed that you action class provides it's own
customization, it uses the default.

The setTemplate method tells the action class to display that customizer vm
file, versus the default.

 

-----Original Message-----
From: jonathan.hawkins@hawkinsweb.co.uk
[mailto:jonathan.hawkins@hawkinsweb.co.uk] 
Sent: Thursday, October 07, 2004 8:50 AM
To: jetspeed-user@jakarta.apache.org
Subject: RE: Changing Default Customize page

Let me get this right...........hopefully.

The user hits the customize button in the top right of the portlet and I
want my customize page displayed. So how do I tell the portlet that it must
use my customize portlet and not the default.

>From what you have said I would need to write an action class with a
buildConfigureContext method, and myCustomizationPage.vm can just use the
default customize action.

Apologies if appearing dense !!!

Jon Hawkins





> That is done in the action class... In the action class, you implement
> the buildConfigureContext method, and invoke the setTemplate method.
>
> Eg.
> setTemplate(rundata, "myCustomizationPage.vm");
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 8:32 AM
> To: jetspeed-user@jakarta.apache.org; jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> Thanks for the quick reply, but how do I tell my portlet to use
> myCustomizationPage.vm and not the default ?
>
> Thanks
>
> Jon Hawkins
>
>
>> Either add a parameter in your portlet definition in the xreg:
>>
>>        <parameter name="provides.customization" value="true"
>> hidden="true"/>
>>
>> or (read this works but haven't tried it) create a
>> providesCustomization
>> which returns true in your action class.
>>
>> We have found an issue however, see
>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>
>> -Art
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 8:15 AM
>> To: jetspeed-user@jakarta.apache.org
>> Subject: Changing Default Customize page
>>
>> I want to change the customize page of my portlet from using the
>> default cutomize page to my own customize page but still using the
>> default customize action. I am using VM.
>>
>> Any assistance would be appreciated.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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



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


RE: Changing Default Customize page

Posted by jo...@hawkinsweb.co.uk.
Let me get this right...........hopefully.

The user hits the customize button in the top right of the portlet and I
want my customize page displayed. So how do I tell the portlet that it must
use my customize portlet and not the default.

>From what you have said I would need to write an action class with a
buildConfigureContext method, and myCustomizationPage.vm can just use the
default customize action.

Apologies if appearing dense !!!

Jon Hawkins





> That is done in the action class... In the action class, you implement
> the buildConfigureContext method, and invoke the setTemplate method.
>
> Eg.
> setTemplate(rundata, "myCustomizationPage.vm");
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 8:32 AM
> To: jetspeed-user@jakarta.apache.org; jetspeed-user@jakarta.apache.org
> Subject: RE: Changing Default Customize page
>
> Thanks for the quick reply, but how do I tell my portlet to use
> myCustomizationPage.vm and not the default ?
>
> Thanks
>
> Jon Hawkins
>
>
>> Either add a parameter in your portlet definition in the xreg:
>>
>>        <parameter name="provides.customization" value="true"
>> hidden="true"/>
>>
>> or (read this works but haven't tried it) create a
>> providesCustomization
>> which returns true in your action class.
>>
>> We have found an issue however, see
>> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>>
>> -Art
>>
>> -----Original Message-----
>> From: jonathan.hawkins@hawkinsweb.co.uk
>> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
>> Sent: Thursday, October 07, 2004 8:15 AM
>> To: jetspeed-user@jakarta.apache.org
>> Subject: Changing Default Customize page
>>
>> I want to change the customize page of my portlet from using the
>> default cutomize page to my own customize page but still using the
>> default customize action. I am using VM.
>>
>> Any assistance would be appreciated.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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


RE: Changing Default Customize page

Posted by Arthur D'Alessandro III <ar...@artd3.com>.
That is done in the action class... In the action class, you implement the
buildConfigureContext method, and invoke the setTemplate method.

Eg.
setTemplate(rundata, "myCustomizationPage.vm");

-----Original Message-----
From: jonathan.hawkins@hawkinsweb.co.uk
[mailto:jonathan.hawkins@hawkinsweb.co.uk] 
Sent: Thursday, October 07, 2004 8:32 AM
To: jetspeed-user@jakarta.apache.org; jetspeed-user@jakarta.apache.org
Subject: RE: Changing Default Customize page

Thanks for the quick reply, but how do I tell my portlet to use
myCustomizationPage.vm and not the default ?

Thanks

Jon Hawkins


> Either add a parameter in your portlet definition in the xreg:
>
>        <parameter name="provides.customization" value="true"
> hidden="true"/>
>
> or (read this works but haven't tried it) create a
> providesCustomization
> which returns true in your action class.
>
> We have found an issue however, see
> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>
> -Art
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 8:15 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: Changing Default Customize page
>
> I want to change the customize page of my portlet from using the
> default cutomize page to my own customize page but still using the
> default customize action. I am using VM.
>
> Any assistance would be appreciated.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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



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


RE: Changing Default Customize page

Posted by jo...@hawkinsweb.co.uk.
Thanks for the quick reply, but how do I tell my portlet to use
myCustomizationPage.vm and not the default ?

Thanks

Jon Hawkins


> Either add a parameter in your portlet definition in the xreg:
>
>        <parameter name="provides.customization" value="true"
> hidden="true"/>
>
> or (read this works but haven't tried it) create a
> providesCustomization
> which returns true in your action class.
>
> We have found an issue however, see
> http://nagoya.apache.org/jira/browse/JS1-520 for more information.
>
> -Art
>
> -----Original Message-----
> From: jonathan.hawkins@hawkinsweb.co.uk
> [mailto:jonathan.hawkins@hawkinsweb.co.uk]
> Sent: Thursday, October 07, 2004 8:15 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: Changing Default Customize page
>
> I want to change the customize page of my portlet from using the
> default cutomize page to my own customize page but still using the
> default customize action. I am using VM.
>
> Any assistance would be appreciated.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org




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


RE: Changing Default Customize page

Posted by Arthur D'Alessandro III <ar...@artd3.com>.
Either add a parameter in your portlet definition in the xreg:

        <parameter name="provides.customization" value="true"
hidden="true"/>

 or (read this works but haven't tried it) create a providesCustomization
which returns true in your action class.

We have found an issue however, see
http://nagoya.apache.org/jira/browse/JS1-520 for more information.

-Art

-----Original Message-----
From: jonathan.hawkins@hawkinsweb.co.uk
[mailto:jonathan.hawkins@hawkinsweb.co.uk] 
Sent: Thursday, October 07, 2004 8:15 AM
To: jetspeed-user@jakarta.apache.org
Subject: Changing Default Customize page

I want to change the customize page of my portlet from using the default
cutomize page to my own customize page but still using the default
customize action. I am using VM.

Any assistance would be appreciated.





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



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


Changing Default Customize page

Posted by jo...@hawkinsweb.co.uk.
I want to change the customize page of my portlet from using the default
cutomize page to my own customize page but still using the default
customize action. I am using VM.

Any assistance would be appreciated.





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


RE: List of user's portlets

Posted by Jonathan Hawkins <jo...@hawkinsweb.co.uk>.
Many thanks, will give that a go tomorrow.

Jon Hawkins

-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: 06 October 2004 18:43
To: Jetspeed Users List
Subject: Re: List of user's portlets

Jonathan Hawkins wrote:

> 
> I want to get a list of the portlets by name or id that are in the users
> profile, not a list of available portlets but only those that are
currently
> configured in the portal for that user.
> 
> Any assistance appreciated.

Try somethin like this:

     public void doPerform(RunData data) throws Exception
     {
         Profile profile = ((JetspeedRunData) data).getCustomizedProfile();
         Portlets portlets = profile.getDocument().getPortlets();
         if (portlets == null)
         {
             return;
         }
         int count = 0;
         count = traverse(portlets, count);
         super.doPerform(data);

     }

     private int traverse(Portlets portlets, int count)
     {
         // First let's add all the Entries in the current level
         Iterator eItr = portlets.getEntriesIterator();
         while(eItr.hasNext())
         {
             Entry entry =  (Entry)eItr.next();

             Portlet portlet = null;
             try
             {
                 portlet = PortletFactory.getPortlet(entry);
             }
             catch (Exception e)
             {
                 log.error("Could not create portlet for entry " + 
entry.getId(), e);
                 continue;
             }
             if (portlet == null)
             {
                 log.error("Could not create portlet for entry " + 
entry.getId());
                 continue;
             }
	}
         //Now if there are child levels, drill down recursively
         if(portlets.getPortletsCount() > 0)
         {
             Iterator pItr = portlets.getPortletsIterator();
             while(pItr.hasNext())
             {
                 Portlets childPortlets = (Portlets)pItr.next();
                 count += traverse(childPortlets, count);
             }
         }
         return count;
     }

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773 4646
[mobile] +01 707 529 9194

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
 


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


Re: List of user's portlets

Posted by David Sean Taylor <da...@bluesunrise.com>.
Jonathan Hawkins wrote:

> 
> I want to get a list of the portlets by name or id that are in the users
> profile, not a list of available portlets but only those that are currently
> configured in the portal for that user.
> 
> Any assistance appreciated.

Try somethin like this:

     public void doPerform(RunData data) throws Exception
     {
         Profile profile = ((JetspeedRunData) data).getCustomizedProfile();
         Portlets portlets = profile.getDocument().getPortlets();
         if (portlets == null)
         {
             return;
         }
         int count = 0;
         count = traverse(portlets, count);
         super.doPerform(data);

     }

     private int traverse(Portlets portlets, int count)
     {
         // First let's add all the Entries in the current level
         Iterator eItr = portlets.getEntriesIterator();
         while(eItr.hasNext())
         {
             Entry entry =  (Entry)eItr.next();

             Portlet portlet = null;
             try
             {
                 portlet = PortletFactory.getPortlet(entry);
             }
             catch (Exception e)
             {
                 log.error("Could not create portlet for entry " + 
entry.getId(), e);
                 continue;
             }
             if (portlet == null)
             {
                 log.error("Could not create portlet for entry " + 
entry.getId());
                 continue;
             }
	}
         //Now if there are child levels, drill down recursively
         if(portlets.getPortletsCount() > 0)
         {
             Iterator pItr = portlets.getPortletsIterator();
             while(pItr.hasNext())
             {
                 Portlets childPortlets = (Portlets)pItr.next();
                 count += traverse(childPortlets, count);
             }
         }
         return count;
     }

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773 4646
[mobile] +01 707 529 9194

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


RE: List of user's portlets

Posted by Jonathan Hawkins <jo...@hawkinsweb.co.uk>.

I want to get a list of the portlets by name or id that are in the users
profile, not a list of available portlets but only those that are currently
configured in the portal for that user.

Any assistance appreciated.



 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
 


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