|
From: Colin S. <col...@ex...> - 2005-03-10 21:15:21
|
I've added createBinder() and initBinder() methods to MultiActionController, similar to what exists already in BaseCommandController. Right now there's no easy way to add custom property editors to a MultiActionController. Note that there's still no way to set a custom MessageCodeResolver strategy such as available in BaseCommandController, to apply to the binder. That arguably should be added as well. Arguably, the whole MultiAction/MethodNameResolver concept needs to make its way into the BaseCommandController and subclasses in some fashion. When creating forms with multiple actions I've needed something similar, and handled dispatching by hand. I think what would perhaps work is to allow the properties to be set, but not to actually use them by default. That is, a subclass of BaseCommandController would have to manually invoke something like MultiActionController's invokeNamedMethod. For example, an AbstractFormController subclass would still override processFormSubmission or showForm as normal, but then as needed would be able to invoke something like invokeNamedMethod in those methods... Or it could manually get a resolved method, and use it as a command name, etc. Colin |