I have used the AbstractFormController to add/edit/validate a widget sucessfully. I am now trying to create a Controller and JSP for adding/editing a childwidget. A widget can contain many childwidgets.
I am trying to decide whether my formbacking object should be a childwidget or a widget. Certain fields are only applicable for a childwidget based on the widget type it is part of, also when adding a new subwidget I have to make sure that a subwidget does not already exist with the same name. So with this in mind I thought I would make my widget the formbacking object. But when I display the JSP I cant work out how to bind to the correct subwidget, my subwidget may be one of many within the widget how do I indicate to the form which subwidget to display ?
Or should I make by subWidget the form backing object, in which case how do reference the widget. I dont think it should be put in reference data as it is much more than that.