From: Achleitner T. <ac...@ec...> - 2004-04-27 06:52:03
|
Hi Keith! I had a closer look at ActionHandler and DefaultVisualAction.=20 I compared it with our existing implementation, where we have a concrete Action class based on a pair of method names (action and guard) that will be executed on the action handler via reflection api. What i did now was that i ported our code to a new class org.springframework.rcp.action.ReflectionbasedVisualAction extending DefaultVisualAction. Class ReflectionbasedVisualAction provides a "call by name" mechanism for invoking methods and automatic checking of the isEnabled state by means of calling the guard actionMethod. Checking the isEnabled state of an action is performed automatically in the background (triggered by input events). To get it working i had to create a public getter in DefaultVisualAction: getActionHandler. I attached the source file. Maybe you can make any use of it. For more details see the class comment.=20 thomas |