Announcement Announcement Module
Collapse
No announcement yet.
binding form attribute to bean when names don't match Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • binding form attribute to bean when names don't match

    Is there a way to bind a form attribute to a command bean when the form attribute name doesn't match the bean property name?

    I want to bind the client certificates that are send with a request to my command bean. I can get the certificates via:

    httpRequest.getAttribute("javax.servlet.request.X5 09Certificate");

    The command bean property name is "appUser.certificates"

  • #2
    Probably easiest thing to do is overide

    protected void onBind(HttpServletRequest request, Object command) in your controller.

    This is called after other binding has already been done. You could then bind as you see fit.

    Comment

    Working...
    X