I assume this same technique will work for Velocity portlets.  I'll give
it a try and let you know how it goes.

I also use chef a little for another project and I think it's great!

Thanks

Eric

-----Original Message-----
From: Wolfgang Irler [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 30, 2003 9:51 AM
To: Jetspeed Users List
Subject: Re: Calling eventSubmit method from HTML link

Eric,
I see Your problem as: calling a portlet action via a link, instead via
a form.

here a hack which works for me:
1. subclass Your JspPortletAction with a class "Update":
..
import org.apache.turbine.util.RunData;
import org.apache.jetspeed.portal.Portlet;
import .......portal.modules.actions.portlets.MyJspPortletAction;

public class Update extends MyJspPortletAction
public void doPerform(RunData data) throws Exception {
         Portlet portlet =
(Portlet)data.getRequest().getAttribute("portlet");
         super.doUpdate( data, portlet );
     }
}

2. my URL is calling a JSP, and it must have the parameter
"action=Update" 
(== name of the class):
   /site/jsp/Udate.jsp?..&action=Update&...

3. (optional) in doPerform(RunData data) of MyJspPortletAction You can
put
..
         if ( data.getRequest().getParameter( "update" ) != null )
             doUpdate( data, portlet );
..
to obtain the same intra-portlet functionning for a portlet-submit like:
/site/portal/user/anon/page/default.psml?update&...

4. this produces the same effect as:
<input type="submit" name="update" value="Update:">
in a form.

The direct http-call has evidently not the portlet-config parameters (as

template ect.). If the call is from an outside page, You should perhaps 
pass the portlet attribute from one request to the next. You must
provide 
the right target, to obtain the updated portlet in the original window.

As You see I don't even use the automatic eventSubmit_doUpdate feature. 
Everyting goes through perform(data)==doPerform(data).

Greetings from the Trentino
                                 Wolfgang
BTW, I'm using jetspeed+CHEF from the chefproject.org. Instead of
"Update" 
I have "Search" and "Upload" in our own CMS. I am also interested in 
integrating axis/SOAP.

....
At 20:31 29-05-03 -0500, you wrote:
>I have a Velocity portlet with a doUpdate() method which calls a URL.
>The .cgi URL that I'm calling returns some information containing
links.
>I need to pass the Base Jetspeed portal URL to the CGI via HTTP
>parameters so that the links will link to the porlet but can't seem to
>find a way to pass anything that will call  eventSubmit_doUpdate from a
>URL.  Said a different way, I want to be able to call
>eventSubmit_doUpdate from a URL instead of through the usual <input
>type="submit" name="eventSubmit_doUpdate"/> way of doing it.
>
>
>
>Thanks in advance
>
>
>
>Eric
>
>----------------------------------------------------
>
>Eric Roberts
>
>Grid Technology Developer
>
>Texas Advanced Computing Center
>
>Office: (512) 471-6785
>
>Email: [EMAIL PROTECTED]
>
>
>
>



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


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

Reply via email to