gpt4 book ai didi

java - Stripes ActionBean 事件总是解析为默认事件

转载 作者:搜寻专家 更新时间:2023-11-01 03:28:59 24 4
gpt4 key购买 nike

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

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

最佳答案

当您尝试将类似 URL 的 /View/myarg1/myarg2/ADD.actionUrlBinding 匹配时/View/{arg1}/{arg2}/{$event} 那么我希望 Stripes 将其解析为名为“ADD.action”的事件。

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

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

关于java - Stripes ActionBean 事件总是解析为默认事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5742921/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com