|
From: <tbl...@gm...> - 2006-08-17 23:15:34
|
Hi there,
I've been playing around with MultiActionController for a few days. In
general I really like the idea and the controller seems to very handy.
There is one thing that I'd enjoy. I was wondering about ability to
explicitly specify which methods are 'blessed' ones. Currently methods
are matched using well-defined pattern, but I'd prefer to annotate
methods using Java SE 5 annotations.
What about such a notation *this is just very simple example/idea*:
@Action
public ModelAndView doSomething(@Command("myCommand") MyCommand
command, @Request HttpServletRequest request);
This means that doSoemthing method is 'blessed' one i.e action method,
first parameter is command object, and second is HTTP request
instance. Note that we don't have to follow strict rules in signature
and we have extreme flexibility in defining signatures.
We can define more parameter-level annotations that would pass
instances as parameters into 'blessed' methods. I'm thinking of
@Response, @Session, etc.
Please note, this post is just rough idea, but it's worth
consideration, I believe. Any comments are welcome. I would be pleased
to discuss this subject in details if anyone is interested.
Regards,
Tom
|