Domanda

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

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top