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 Timo Tetzlaf <Ti...@metris.de> on 2002/10/29 13:18:30 UTC

portlet <-> actionclass relation

Hi everyone,
can anyone explain me the relation between a portlet and the corresponding
action class ?
I can´t find any information about it.
 
Why i am asking this question is:
I try to init() a portlet and within this method a generic variable (handle
from a web service) has to pass to the action class.
How can i get this variable within my action class ?
 
Another question is:( buildNormalContext() and getContent() )
how can i define a content in one of these methods and extend this content
in the other method ?
how does these both methods works together ?
 
best regards
Timo

RE: portlet <-> actionclass relation

Posted by Hugh Brien <hp...@comcast.net>.
Start with the HelloWorld portlet and work from there.

Start with a simple MyOwnPortlet with a template called myownportlet.vm.

Create a new .xreg file called   my-own-portlets.xreg.

Copy the HelloVelocity entry in demo-portlets.xreg to the
my-own-portlets.xreg.

Change  the name and description in the <portlet> entry to what you want.

Get this working.

After you get this working create an action class that inherits from
VelocityPortletAction.

Im buildNormalContext()  add a couple of strings to the Context and see if
you can them to work
in your portlet.

If you want to execute events  you can add some doView or doExecute methods
to your action class.

r,
Hugh

  -----Original Message-----
  From: Timo Tetzlaf [mailto:Timo.Tetzlaf@metris.de]
  Sent: Tuesday, October 29, 2002 7:19 AM
  To: 'jetspeed-user@jakarta.apache.org'
  Subject: portlet <-> actionclass relation


  Hi everyone,
  can anyone explain me the relation between a portlet and the corresponding
action class ?
  I can´t find any information about it.

  Why i am asking this question is:
  I try to init() a portlet and within this method a generic variable
(handle from a web service) has to pass to the action class.
  How can i get this variable within my action class ?

  Another question is:( buildNormalContext() and getContent() )
  how can i define a content in one of these methods and extend this content
in the other method ?
  how does these both methods works together ?

  best regards
  Timo