Conclusion
Now we know how to add completely new functionality to a Marbles-based web application. You've probably noticed that it's easier to add new functionality than to change existing one, and that a lot of improvements are needed, but in general the cycle is like this:
- write a Java action
- create a template for it
- map it on
xwork.xml
We learned that there are three ways to show new content:
- in a tab of a tabbedPane
- as a completely new page
- as a flash message
This also means you experienced the power of the built in macros. It is a matter of two lines to display a new page independently instead in a tab. In addition to that you have learned about the predefinded way of affirmation.
If you look back at your code, you'll see that most actions are very similar. Actions need to be similar while retaining their uniqueness where it matters — and only where it matters, that's why we will obsolete the setters. The whole point is for the developer to be able to express what he or she wants and other developers to be able to read it.
Speaking of reading code, we didn't show you authorization yet. The most expressive code ever! Still curious?
|