1. Create an action class that extends VelocityPortletAction. 2. Override buildNormalContext(). 3. Add the action to one of the state "modules" packages 4. You will need specify the action in the XREG file where your portlet definition 5. Check out the HelloWorld velocity portlet. It would look something like this: public class ClientDocumentsAction extends NovusVelocityPortletAction { protected void buildNormalContext( VelocityPortlet portlet, Context context, RunData rundata ) throws Exception { if (rundata.getUser().hasLoggedIn()) { String[] clientDocIds = OurManagerClass.getClientDocIds(); context.put("clientdocumentsids", clientDocIds); } } }
<portlet-entry name="ClientDocuments" hidden="false" type="ref" parent="CustomizerVelocity" application="false"> <meta-info> <title>Novus Expense Approval List</title> <description>Expense Approval List</description> </meta-info> <parameter name="template" value="clientdocuments" hidden="false" /> <parameter name="action" value="ClientDocumentsAction" hidden="false" /> </portlet-entry> -----Original Message----- From: Timo Tetzlaf [mailto:Timo.Tetzlaf@;metris.de] Sent: Tuesday, October 22, 2002 3:18 AM To: '[EMAIL PROTECTED]' Subject: portlet action class questions hi everybody, I have a problem with my own portlet and VelocityPortletAction. I have written my own portlet and this work fine. Now I want to write an actionclass for interaction with the portlet. But I have no idea how i get working it. Till know I have extends VelocityPortletAction, but i donīt know which methods I have to write. Must the actionclass registered anywhere ? And how can i push attributes to the class ? thanks for your help Timo ================ Timo Tetzlaf - E-Solutions - Metris GmbH Industriestr. 5 D-78112 St. Georgen Tel.: 07724 / 880 7177 Fax: 07724 / 880 7115 www.metris.de ================