I agree the method signature is not very intuitive and it is a good tip
indeed.

Velocity:

    public void doAction(RunData rundata, Context context)
    protected void buildNormalContext(VelocityPortlet portlet, Context
context, RunData rundata)

JSP:

    public void doAction(RunData rundata, Portlet portlet)
    protected void buildNormalContext(Portlet portlet, RunData rundata)

I wanted to be as close as possible to Velocity :(

Best regards,

Mark Orciuch - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/


> -----Original Message-----
> From: Michael Rothrock [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 12:09 AM
> To: Jetspeed Users List
> Subject: Handy tip for JSP actions
>
>
> After many, many frustrating hours of examining registry entries, JSP
> templates, and tracing functions (via debug statements, no less), I've
> finally managed to get JSP actions working.  As I suspected while I was
> debugging, it ended up being a very stupid, but easy, mistake.
>
> In the hopes that other people will benefit from my frustration,
> I share the
> thing that got me:
>
> In your subclass of JspPortletAction, you will have something like this:
>
>     protected void buildNormalContext(Portlet portlet, RunData rundata) {
>         // bla
>     }
>
>     public void doAction(RunData rundata, Portlet portlet) {
>         // bla
>     }
>
> If you cut and paste the method signature from buildNormalContext for your
> actions, like I did, you'll end up with the parameters to your actions in
> the REVERSE order!  (Look closely at the two methods--they have the same
> parameters, but in reverse order.)  Thus, it will never see your
> actions and
> always build the normal context, leaving you baffled.
>
> As I said, it's stupid--but easy to do nonetheless.
>
> -- Michael
>
>
> ---------------------------------------------------------------------
> 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