portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <d.tay...@onehippo.com>
Subject Re: WebContentPortlet
Date Tue, 24 Nov 2009 02:38:38 GMT
On Nov 23, 2009, at 10:59 AM, Robert Walthall wrote:

> Hi All,
> I have a question about the WebContentPortlet.  By default it pulls up
> http://www.google.com
> which is configured in this file <snip>/webapps/demo/WEB-INF/ 
> portlet.xml
>
> I can edit that file and change the page that the portlet pulls up.
>
> The issue is that I need to be able to create several of these  
> portlets, and
> they need to go to different webpages.
>
> Could that be accomplished by copying/renaming the WebContentPortlet  
> files,
> and editing the filename/path so that it points to a different file
> (webapps/demo/WEB-INF/portlet2.xml)?
>
> Any tips on what files would need to be copied/renamed/edited would  
> be much
> appreciated.

There are several ways to handle this currently:

* copy and paste the entries in the portlet.xml. Redeploy. Probably  
not the most appealing approach as you are just changing one  
preference and cutting and pasting the rest
* with the customizer add a new WebContentPortlet to your page and  
then go into edit mode to modify the SRC preference. Again, not  
perfect and to make matters worse, if you don't set up in  
edit_defaults mode, the preference is only good for the current user
* with the customizer add a new WebContentPortlet to your page and  
then go into edit defaults mode to modify the SRC preference. Problem:  
the WebContent portlet doesn't support edit_defaults mode out of the  
box you have to change that yourself (edit_defaults actually stores to  
psml)

In the trunk, we are working a new solution with portlet references.  
You can create a portlet reference (also called a portlet instance).  
If you are interested in working against a pre-release let me explain:

References should be declared  in a fpsml files:

<?xml version="1.0" encoding="UTF-8"?>
<fragment-definition id="definition"
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/psml.xsd

">

   <title>DEFINITION</title>
   <fragment id="wp-definition" type="portlet"  
name="webcontent::WebContentPortlet">
       <preference name="SRC">
         <value>http://www.apache.org/</value>
       </preference>
    </fragment>
</fragment-definition>

There will be two UI enhancements to support references:

1. a Portlet Reference Editor to create new references from existing  
'real' portlets, and override only specific preferences
2. an enhanced Toolbox (Portlet Selector) that will merge portlet  
references with portlets in the portlet selection and search process  
(all references will be indexed)

Portlet References are now implemented in the trunk however we have  
not yet developed the UI support. These features will be included in  
the next release

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


Mime
View raw message