Announcement Announcement Module
No announcement yet.
formBackingObject - exception handling Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • formBackingObject - exception handling

    formBackingObject is supposed to be overwritten to pre-poluate the command object for edit scenario.

    In web application sometime, the record could have been deleted by other user. So the record to populate command object will not be available and proper error message should be thrown to the user.

    Was just wondering, how do you guys handle such scenario.

  • #2
    I would generally throw a runtime exception and let the exception framework render a meaningful display.

    In all cases I have come across, the user isn't likely to know how to deal with it.


    • #3
      Thx for the reply, yeah that's how I currently handle it through exception resolver. Coz was trying to intercept it at the controller level (usign SimpleFormController) but all the methods to intercept were declared as final. Though more flexibility if it can be done at controller level, so was just wondering if it is something that is lacking in the design of SimpleFormController.