4

のようにフォーマットされた cleanurls を使用してい /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
----
4

1 に答える 1

2

次のような URL を/View/myarg1/myarg2/ADD.actionUrlBinding と一致 /View/{arg1}/{arg2}/{$event}させようとしている場合、Stripes はこれを「ADD.action」という名前のイベントに解決することを期待します。

アクション Bean のソース コードを提供していないため、次のようなHandlesEventでイベント ハンドラーに注釈を付けていないと思われます。

@HandlesEvent("ADD.action")
public Resolution add() {
   ... do handle add ...
}
于 2011-04-21T20:27:52.837 に答える