Stripes ActionBean事件始终解析为默认事件

时间:2011-04-21 10:36:47

标签: java stripes

我正在使用格式为/View/{arg1}/{arg2}/{$event}的清洁。

ActionBeanView有多个事件。但无论我从浏览器调用哪个事件,都会将其解析为默认事件。

任何想法我做错了什么(Stripes相当新)。

以下是错误日志:

11:24:18,497 DEBUG UrlBindingFactory:145 - Matched /View/myarg1/myarg2/ADD.action to [/View/{id}/{asof}/{$event}]

11:24:18,497 DEBUG ExecutionContext:150 - Transitioning to lifecycle stage Reque
stInit

11:24:18,497 DEBUG ExecutionContext:150 - Transitioning to lifecycle stage Actio
nBeanResolution

11:24:18,497 DEBUG UrlBindingFactory:145 - Matched /View/myarg1/myarg2/ADD.action to [/View/{id}/{asof}/{$event}]

11:24:18,497 DEBUG UrlBindingFactory:145 - Matched /View/myarg1/myarg2/ADD.action to [/View/{id}/{asof}/{$event}]

11:24:18,497 DEBUG ExecutionContext:150 - Transitioning to lifecycle stage Handl
erResolution

11:24:18,497 DEBUG UrlBindingFactory:145 - Matched /View/myarg1/myarg2/ADD.action to [/View/{id}/{asof}/{$event}]

11:24:18,497 DEBUG DispatcherHelper:184 - Resolved event: myDefaultEvent; will invoke:
 ViewActionBean.myDefaultEvent()

11:24:18,497 DEBUG ExecutionContext:150 - Transitioning to lifecycle stage Bindi
ngAndValidation

11:24:18,497 DEBUG DefaultActionBeanPropertyBinder:453 - Running required field
validation on bean class www.ViewActionBean

11:24:18,497 DEBUG DefaultActionBeanPropertyBinder:779 - Converting 1 value(s) u
sing converter net.sourceforge.stripes.validation.StringTypeConverter

11:24:18,513 DEBUG DefaultActionBeanPropertyBinder:779 - Converting 1 value(s) u
sing converter net.sourceforge.stripes.validation.StringTypeConverter

11:24:18,513 DEBUG DefaultActionBeanPropertyBinder:282 - Could not bind property
 with name [ADD.action] to bean of type: ViewActionBean : Bean class www.View
ActionBean does not contain a property called 'ADD'. As a result the followin
g expression could not be evaluated: ADD.action
----

1 个答案:

答案 0 :(得分:2)

当您尝试将/View/myarg1/myarg2/ADD.action之类的网址与UrlBinding /View/{arg1}/{arg2}/{$event}匹配时,我希望Stripes将此解析为名为“ADD.action”的事件。< / p>

由于您没有提供Action Bean的任何源代码,我怀疑您没有使用HandlesEvent这样的事件处理程序注释:

@HandlesEvent("ADD.action")
public Resolution add() {
   ... do handle add ...
}