Redirect back to profile after adding a field.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 14 Jan 2011 11:39:08 +0000 (12:39 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 14 Jan 2011 11:39:08 +0000 (12:39 +0100)
src/main/java/net/pterodactylus/sone/web/EditProfilePage.java

index 98bc49f..c1bac4a 100644 (file)
@@ -92,6 +92,7 @@ public class EditProfilePage extends SoneTemplatePage {
                                        currentSone.setProfile(profile);
                                        fields = profile.getFields();
                                        webInterface.getCore().saveSone(currentSone);
+                                       throw new RedirectException("editProfile.html#profile-fields");
                                } catch (IllegalArgumentException iae1) {
                                        dataProvider.set("fieldName", fieldName);
                                        dataProvider.set("duplicateFieldName", true);