Have you tried using the setTemplate method to change the template. I use this in almost all of my Velocity template based portlets. Let me know if you need an example.

--Sloan


On Nov 3, 2003, at 10:57 AM, Amin Lalji wrote:


Hello,

I have a portlet that is used to do some data entry...
When the user has successfully entered data (passes validation)
I would like to replace the contents of the current portlet with
a portlet indicating success... (preserving the other tabs,etc.)

I have deployed the "Success" velocity template as a portlet in the
registry (name= "AddInfoSuccess").

I have tried setting up the forward service to forward after successful
data entry, but it does not work...it requires the portlet id... I only
know the portlet name...


portlets.xreg


<portlet-entry name="AddInfoSuccess" hidden="false" type="ref"
parent="Velocity" application="false">
                <meta-info>
                        <title>Successfully added Information</title>
                        <description>Add Information Success
Message</description>
                </meta-info>
                <parameter name="template" value="add-info-success"
hidden="true"/>
                <media-type ref="html"/>
        </portlet-entry>

forwards.xml:
<forward name='AddInfoSuccess'>
        <page name='default'/>
        <portlet id='myPortlet' action='controls.Maximize'/>
    </forward>

<portlet-forward portlet='AddInfoForward' forward='AddSInfoSuccess'
target='Success'/>

Java Code in Action:

ForwardService fs =
(ForwardService)ServiceUtil.getServiceByName(ForwardService.SERVICE_NAM E
);

fs.forward(data, "AddInfoForward","Success");


Any ideas?

Thanks

Amin



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------
Sloan Bowman
www.nashlinux.com
www.q3networks.com
www.aboutgoodlettsville.com
www.spudibby.com
---------------------------
Windows 95/NT - 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to