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 Ji...@SunGard.com on 2002/10/30 16:54:23 UTC

HelloWorld portlet

Can't get it to work.
Shows up in Add Portlets, but not on the user page after adding.
Any ideas, anybody ?
Here is my portlet:

package com.sungard.portal.portlets;

import org.apache.jetspeed.portal.portlets.AbstractPortlet;
import org.apache.turbine.util.RunData;
import org.apache.ecs.ConcreteElement;
import org.apache.ecs.StringElement;

public class HelloWorldPortlet extends AbstractPortlet
{
    public ConcreteElement getContent (RunData runData)
    {
        return (new StringElement ("Hello World!"));
    }
}

And then my xreg entries:
portlets.xreg
    <portlet-entry name="HelloWorld" hidden="false" type="instance"
application="false">
        <meta-info>
            <title>HelloWorld</title>
            <description>Portlet How To Example 1 ? Hello World</
description>
        </meta-info>
        <classname>com.sungard.portal.portlets.HelloWorldPortlet</classname
>
        <media-type ref="html"/>
        <url cachedOnURL="true"/>
    </portlet-entry>


demo-portlets.xreg
    <portlet-entry name="HelloWorld" hidden="false" type="ref"
        parent="HelloWorldPortlet" application="false">
        <meta-info>
            <title>Hello World</title>
            <description>Hello World</description>
        </meta-info>
        <classname>com.sungard.portal.portlets.HelloWorldPortlet</classname
>
        <parameter name="dont_remove_applet" value="yes" hidden="false"
            cachedOnName="true" cachedOnValue="true"/>
        <url cachedOnURL="true">http://java.sun.com/</url>
        <category group="Jetspeed">sites.companies.sun</category>
    </portlet-entry>


Jim Jackson
SunGard EBS

This email message is for the sole use of the intended recipient(s) and may
contain confidential information.  Any unauthorized review, use, disclosure
or distribution is prohibited.  If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the
original message.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: HelloWorld portlet

Posted by Ozgur Balsoy <ba...@grids.ucs.indiana.edu>.
Assuming that you copied & pasted the registery files, could the 
problems be that
1) you have given the both of the portlets the same name, "HelloWorld."
2) you don't have a parent portlet called "HelloWorldPortlet." See 1).

Ozgur

Jim.Jackson@SunGard.com wrote:
> Can't get it to work.
> Shows up in Add Portlets, but not on the user page after adding.
> Any ideas, anybody ?
> Here is my portlet:
> 
> package com.sungard.portal.portlets;
> 
> import org.apache.jetspeed.portal.portlets.AbstractPortlet;
> import org.apache.turbine.util.RunData;
> import org.apache.ecs.ConcreteElement;
> import org.apache.ecs.StringElement;
> 
> public class HelloWorldPortlet extends AbstractPortlet
> {
>     public ConcreteElement getContent (RunData runData)
>     {
>         return (new StringElement ("Hello World!"));
>     }
> }
> 
> And then my xreg entries:
> portlets.xreg
>     <portlet-entry name="HelloWorld" hidden="false" type="instance"
> application="false">
>         <meta-info>
>             <title>HelloWorld</title>
>             <description>Portlet How To Example 1 ? Hello World</
> description>
>         </meta-info>
>         <classname>com.sungard.portal.portlets.HelloWorldPortlet</classname
> 
>         <media-type ref="html"/>
>         <url cachedOnURL="true"/>
>     </portlet-entry>
> 
> 
> demo-portlets.xreg
>     <portlet-entry name="HelloWorld" hidden="false" type="ref"
>         parent="HelloWorldPortlet" application="false">
>         <meta-info>
>             <title>Hello World</title>
>             <description>Hello World</description>
>         </meta-info>
>         <classname>com.sungard.portal.portlets.HelloWorldPortlet</classname
> 
>         <parameter name="dont_remove_applet" value="yes" hidden="false"
>             cachedOnName="true" cachedOnValue="true"/>
>         <url cachedOnURL="true">http://java.sun.com/</url>
>         <category group="Jetspeed">sites.companies.sun</category>
>     </portlet-entry>
> 
> 
> Jim Jackson
> SunGard EBS
> 
> This email message is for the sole use of the intended recipient(s) and may
> contain confidential information.  Any unauthorized review, use, disclosure
> or distribution is prohibited.  If you are not the intended recipient,
> please contact the sender by reply email and destroy all copies of the
> original message.
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: HelloWorld portlet

Posted by David Sean Taylor <da...@bluesunrise.com>.

> -----Original Message-----
> From: Jim.Jackson@SunGard.com [mailto:Jim.Jackson@SunGard.com]
> Sent: Wednesday, October 30, 2002 7:54 AM
> To: jetspeed-user@jakarta.apache.org
> Subject: HelloWorld portlet
> 
> 
> Can't get it to work.
> Shows up in Add Portlets, but not on the user page after adding.
> Any ideas, anybody ?

Where did you place your HelloWorld class file?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>