[Logo] Mentawai Recipes
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Moderation Log] Moderation Log   [Register] Register / 
[Login] Login 
Turning any method from any POJO into an action (POJO Actions)  XML
Forum Index » Official Recipes
Author Message

Joined: 10/01/2008 08:20:15
Messages: 39

With Mentawai you can use any java class (POJO) as an action. You can also call any method without any restriction. Check the examples below:

In the application manager you just register the POJO action as you would register any other action:

Tthe action input parameters will be sorted in alphabetical order. However, if you want to explicit determine what values will be used as the method parameters, you can setup a MethodParamFilter. For example, let's say you have the following request:


If you want to make sure the method addTwoNumbers take the action input values x and y, and not a and b, which is the default because a and b come first in alphabetical order, then all you have to do inside your application manager is:

Forum Index » Official Recipes
Go to:   
Powered by JForum 2.1.8 © JForum Team