You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Peter Lynch <pe...@yahoo.com> on 2001/06/06 23:22:22 UTC

Changing Action Interface

Hey there,

I'm curious. Why were actions and action events were
decided to be two different parameters? It seems a
simpler approach would have been to have one parameter
named "action" with a possible value of 

<action classpath>/<action classname>.<action method
name>

This seems simpler. Also the current convention may
force you to name your action class methods like

doLongmethodname as opposed to

doLongMethodName 

The second being more of a standard method naming
scheme.

If I wanted to change this behaviour/add this
functionality it looks like I would affect the Turbine
servlet itself and the class that parses the action
events (whereever that is :-) ).

Is this true?

Peter





__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Changing Action Interface

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/6/01 2:22 PM, "Peter Lynch" <pe...@yahoo.com> wrote:

> Hey there,
> 
> I'm curious. Why were actions and action events were
> decided to be two different parameters? It seems a
> simpler approach would have been to have one parameter
> named "action" with a possible value of
> 
> <action classpath>/<action classname>.<action method
> name>
> 
> This seems simpler. Also the current convention may
> force you to name your action class methods like
> 
> doLongmethodname as opposed to
> 
> doLongMethodName 
> 
> The second being more of a standard method naming
> scheme.

How do you handle this case:

<form action="Foo">

<input type="submit" name="eventSubmit_doFoo">
<input type="submit" name="eventSubmit_doFooBar">
</form>

> If I wanted to change this behaviour/add this
> functionality it looks like I would affect the Turbine
> servlet itself and the class that parses the action
> events (whereever that is :-) ).

You should never need to modify the Turbine.java

The class you want is ActionEvent.java. You don't need to modify it though.
All you need to do is create your own version of it and then make your own
actions extend it.

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Balmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org