[jboss-jira] [JBoss JIRA] Commented: (GPD-147) Removing elements directly from source editor doesnt update the model and adater

Koen Aers (JIRA) jira-events at lists.jboss.org
Tue Aug 14 17:46:01 EDT 2007


    [ http://jira.jboss.com/jira/browse/GPD-147?page=comments#action_12372157 ] 
            
Koen Aers commented on GPD-147:
-------------------------------

There are still a lot of issues with the synchronization of the xml page and the graphical page. They will not be fixed for the upcoming GA, but surely need to be fixed over time after this release.
Everybody is welcome to add any other problems one might have with this.

Thanks,
Koen

> Removing elements directly from source editor doesnt update the model and adater
> --------------------------------------------------------------------------------
>
>                 Key: GPD-147
>                 URL: http://jira.jboss.com/jira/browse/GPD-147
>             Project: JBoss jBPM GPD
>          Issue Type: Bug
>          Components: jpdl
>    Affects Versions: jBPM JPDL Designer 3.1.0.beta2
>            Reporter: Imran Naqvi
>         Assigned To: Koen Aers
>
> When I make a change the xml directly from the source page, particularly if i remove an element, the change doesnt get reflected in the adapter and model. Hence when I come back to the graph page the element remains there although it has been removed from the xml.
> For example, in any process definition go to the source page and delete a node from there, then go back to the graph page, the node will still be there. I found that the problem is in this method in XmlAdapter:
> public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
> 		if (changedFeature != null) {
> 			doModelUpdate(((Node)changedFeature).getNodeName(), (String)newValue);
> 		} else if (INodeNotifier.ADD == eventType) {
> 			handleDomAdd(newValue);
> 		} else if (INodeNotifier.REMOVE == eventType) {
> 			handleDomRemove(oldValue);
> 		}
> 	}
> When an element is removed this method is called with the corect event type which is remove, so handleDomRemove should be called (which would call the doModelRemove method), but instead the doModelUpdate is called instead since changedFeature is not null (never is). I am not absolutely sure why the first check is there so I cant suggest a fix but as far as I can see that first if statement should be moved to the end.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list