2011-04-21 111 views
4

我正在使用格式爲/View/{arg1}/{arg2}/{$event}的cleanurls。條紋ActionBean事件始終解析爲默認事件

ActionBeanView有多個事件。但是,無論我從瀏覽器調用哪個事件,都會將其解析爲默認事件。

任何想法我做錯了什麼(對條紋相當新)。

以下是錯誤日誌:

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 
---- 
+0

而怪異的URL。該網址不應該是View/myarg1/myarg2/add而不是View/myarg1/myarg2/ADD.action? – yihtserns 2011-04-24 06:53:57

回答

2

當你試圖匹配像一個URL:與UrlBinding/View/{arg1}/{arg2}/{$event}​​那麼我希望條紋解決這個名爲事件:「ADD.action」 。

由於你沒有提供的Action Bean的任何源代碼,我懷疑你沒有註釋的事件處理程序與HandlesEvent這樣的:

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