Results 1 to 3 of 3

Thread: formBackingObject - exception handling

  1. #1
    Join Date
    Mar 2005
    Posts
    11

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    1,905

    Default

    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. #3
    Join Date
    Mar 2005
    Posts
    11

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •