문제

Is it possible to assign the value to the bean property by implementing ModelDriven interface but having different name in request and bean

for eg Ajax request DemoStruts.Action?param_a=649

the value of param_a parameter must set to the property paramAR in the bean. For doing this is there any xml configuration or annotation to specify this mapping

도움이 되었습니까?

해결책

The normal mechanism is the alias interceptor, although I haven't used it for deep aliasing.

There are some pretty hideous games you can play with this technique. I've never been entirely sure if it's a good idea or not, though; another option is to just map parameters manually in the action itself. This is often easier to understand.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top