[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 
Using conventions for the view layer  XML
Forum Index » Official Recipes
Author Message
saoj



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

Mentawai, by default, supports the following convention for the view layer:

Because we did not define any consequence for the HelloAction, the consequence used by default will be a forward to /HelloAction/sayHello.jsp, no matter what result (SUCCESS, ERROR, etc.) the action returns.

You can also use more conventions to simplify the configuration above to:

The name of the action will the the name of the class (HelloAction) and you don't need to specify the method name (inner action) unless you want to create a configuration specific for that method.

And you don't even need to specify each and every action you will use in the application manager. Let's say your actions are distributed across the packages com.mysite.actions and com.mysite.actions.user, then you can just do this:

And last but not least, you can create your on conventions by implementing the ConsequenceProvider interface:

Then you can set it up in the application manager like this:

And don't forget you can always configure your actions by hand:

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