Hi Tobias,

from http://jakarta.apache.org/turbine/turbine-2.3/howto/action-event-howto.html


Because ParameterParser makes all the key values lowercase, we have to do some work to format the string into a method name. For example, a button name eventSubmit_doDelete gets converted into eventsubmit_dodelete. Thus, we need to form some sort of naming convention so that dodelete can be turned into doDelete.

Thus, the convention is this:

  • The variable name MUST have the prefix "eventSubmit_".
  • The variable name after the prefix MUST begin with the letters "do".
  • The first letter after the "do" will be capitalized and the rest will be lowercase
If you follow these conventions, then you should be ok with your method naming in your Action class.

kind regards

Jürgen Hoffmann

Am Do, den 29.07.2004 schrieb tobias rademacher um 10:19:
Hi Henning,

what is the reason for this restriction? Why do you lower case the method names?
Creating methods lower cased names only is not java-ish and is a reason for stumpling over when starting with Turbine. :-(

Thx
Toby

> -----Ursprüngliche Nachricht-----
> Von: Henning P. Schmiedehausen [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 29. Juli 2004 10:06
> An: [EMAIL PROTECTED]
> Betreff: Re: Change Layout in action
> 
> 
> Olli <[EMAIL PROTECTED]> writes:
> 
> >What do you want to say to me?
> 
> The question was: Are you sure that your action event is 
> actually called?
> 
> You can't do
> 
> $link.setActionEvent("MyAction", "ChangeLayout")
> 
> it must be 
> 
> $link.setActionEvent("MyAction", "Changelayout")
> 
> Notice the lower case "l". This is one of the restrictions that
> Turbine places on the event names. You must not user a camel-case word
> here. Your action event name can have only one capital letter.
> 
> And your method must be called doChangelayout
> 
> 	Regards
> 		Henning
> 
> 
> >Henning P. Schmiedehausen writes:
> 
> >> [EMAIL PROTECTED] writes:
> >> 
> >> 
> >>>Hi!
> >> 
> >> 
> >>>I'm quite a newbie to turbine and im trying to chage the 
> layout template in an action. 
> >>>My approach doesn't work:
> >>>...
> >>>public void doChangeLayout(RunData data, Context context) {
> >>>		data.setLayoutTemplate("NewLayout.vm");
> >>>	}
> >> 
> >> 
> >> Trivial? doChangelayout ?
> >> 
> >> The Action must have exactly one capital letter. 
> >> 
> >> 	Regards
> >> 		Henning
> >> 
> 
> 
> 
> 
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
> [EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/
> 
> RedHat Certified Engineer -- Jakarta Turbine Development  -- 
> hero for hire
>    Linux, Java, perl, Solaris -- Consulting, Training, Development
> 
> "Fighting for one's political stand is an honorable action, but re-
>  fusing to acknowledge that there might be weaknesses in one's
>  position - in order to identify them so that they can be remedied -
>  is a large enough problem with the Open Source movement that it
>  deserves to be on this list of the top five problems."
>                        -- Michelle Levesque, "Fundamental Issues with
>                                     Open Source Software Development"
> 
> ---------------------------------------------------------------------
> 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]


!EXCUBATOR:4108b33e102742104791296!
Mit freundlichen Grüßen

Jürgen Hoffmann

ByteAction GmbH
Auf der Beune 83-85
64839 Münster
HRB33271

telefon: +49 (0)6071 - 92160 (09:00 - 18:00 Uhr)

0700 byteaction / 0700 29832284 (24x7)
telefax: +49 (0)6071 - 921620

0700 29832284
email: [EMAIL PROTECTED]
web: www.byteaction.de


This Communication is intended only for the party to whom it is addresses, and may contain information which is privileged or confidential. Any other delivery, distribution, copying or disclosure is strictly prohibited and is not a waiver of privilege or confidentiality. If you have received this telecommunication in error, please notify the sender immediately by returning this electronix mail and destroy the message


Reply via email to