
Some parts of this message have been removed.
Learn more about Nabble's
security policy.
[1236] trunk/gwt-client/src/main/java/org/mule/galaxy/web/client/artifact/NameEditPanel.java: GALAXY-337 Improved the logic to save (and thus refresh) only if name or workspace actually changed
- Revision
- 1236
- Author
- andrew
- Date
- 2008-07-23 15:46:29 -0500 (Wed, 23 Jul 2008)
Log Message
GALAXY-337 Improved the logic to save (and thus refresh) only if name or workspace actually changed
Modified Paths
Diff
Modified: trunk/gwt-client/src/main/java/org/mule/galaxy/web/client/artifact/NameEditPanel.java (1235 => 1236)
--- trunk/gwt-client/src/main/java/org/mule/galaxy/web/client/artifact/NameEditPanel.java 2008-07-23 20:27:01 UTC (rev 1235)
+++ trunk/gwt-client/src/main/java/org/mule/galaxy/web/client/artifact/NameEditPanel.java 2008-07-23 20:46:29 UTC (rev 1236)
@@ -143,15 +143,22 @@
panel.add(row);
}
- protected void save(final String workspaceId, final String newName) {
- galaxy.getRegistryService().move(artifactId, workspaceId, newName, new AbstractCallback(errorPanel) {
+ protected void save(final String newWorkspaceId, final String newName) {
+ if (!newWorkspaceId.equals(this.workspaceId) || !newName.equals(this.name)) {
+ // save only if name or workspace changed
+ galaxy.getRegistryService().move(artifactId, newWorkspaceId, newName, new AbstractCallback(errorPanel) {
- public void onSuccess(Object arg0) {
- // need to refresh the whole panel to fetch new workspace location and entry name
- callbackPanel.onShow(callbackParams);
- }
-
- });
+ public void onSuccess(Object arg0) {
+ // need to refresh the whole panel to fetch new workspace location and entry name
+ callbackPanel.onShow(callbackParams);
+ }
+
+ });
+ } else {
+ // restore the original view
+ panel.clear();
+ initName();
+ }
}
protected boolean validateName(final ValidatableTextBox nameTB) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MuleForge Dev" group.
To post to this group, send email to
muleforgedev@... To unsubscribe from this group, send email to
muleforgedev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/muleforgedev?hl=en
-~----------~----~----~----~------~----~------~--~---
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://admin.muleforge.org/manage_email