1 Reply Latest reply on Jul 10, 2008 11:24 AM by s p

    doModelUpdate, doModelRemove in ControllerDomAdapter

    s p Newbie

      Hello, I'm extending gpd, and I can't find a way to synchronizing xml with model when somebody is removing tags from xml source that are nested in controller.

      I have custom TaskControllerHandlers and in gpd i differentiate tasknodes with them by controller's classname. I also have many custom XXXDomAdapters that extend TaskNodeAdapter, custom XXXPropertySections and custom models.

      My problem is - I can't react in my custom DomAdapters to user removing whole tags nested in controller tag in tasknodes, becouse nor doModelUpdate neither doModelRemove of my DomAdapter are called. So xml and model are not synchronized anymore.

      It would be very useful for me, if instead of being empty method doModelRemove of ControllerDomAdapter would have something like that:

       protected void doModelRemove(XmlAdapter child) {
       String type = child.getElementType();
       Controller controller = (Controller) getSemanticElement();
       if ("genericElement".equals(type)) {
       controller.removeGenericElement((GenericElement) child
       .getSemanticElement());
       }
       }
      


      I didn't know if this is bug, so I send it here, not at JIRA.