Community
Participate
Working Groups
If you edit the XML in the "source" view of the Layout Editor, and then try to switch back to the Layout view, you will get an error message indicating that you need to save your changes. This problem is the user has to figure out what he needs to do to save the changes (or discard them, which is even harder), and the error message is not very good. The error message is "Source page is dirty. Other pages cannot be used until the source is saved." (including the quotes). And then the user needs figure out how to save or discard their changes. A better and more typical approach would be: XML Report Design has been changed. Do you want to save the changes? <Yes> <No> <Cancel> Yes would save the changes No would discard the changes Cancel would do nothing and remain on the Source page In addition, the dialog is titled "Error" (including the quotes). The dialog needs to use a better title (and certainly should not have the quotes).
Add new message dialog to let user choice to save,doesn't save or cancel. The only different with the suggesion from Paul is, if user select no the chages will not be discarded automatically. Becuase if we do auto discarding, we need reload the file and rebuild all graphical designer. That can be a potential performace issue. So if user select no the page will switch to graphical editor. The user can simplly click the save button to discard all source changes.
I disagree with the suggested behavior -- if they select "No" (i.e. don't save) this will be very confusing for users if they are simply returned to the visual layout editor. If I understand this correctly, they will now be at a point where the content in the XML view and the visual view are out of sync. This is not intuitive and is a serious usability issue. I might add that we should support discarding the changes since there are users who will make changes to the XML file and then may decide they want to discard them anyway.
I meant to add that once they are back in the layout view, users will not know that simply clicking the save button will discard the changes they made in the XML.
I agreed with the Paul's suggested behaviour because that will be what most people have expected. Even with the current behaviour, I don't see how can we avoid to reload the design after the user saved the change in XML tab. One more issue is that we don't have a good way to discard the changes made in the XML source unless I close the whole report editor. Two other improvements that we can have for XML sourec editor: 1. When I switch to normal tab from XML tab, the XML soure editor should highlight the tag or the line that has error if the xml source is invalid, so users can easily figure out how to fix the error. 2. if the report design is invalid, we should open the design file with XML source editor, and highlight the line with syntax errors. That's one of main objectives to include the XML source editor.
If user selection no when user try to switch from xml source to report designer, all changes will be discarded. Other requirement from Wenbin, i'll fire a new enhacment for BIRT 2.1
Verified in build 20051222.